Merge "Make pthread join_state not protected by g_thread_list_lock."
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index ae0541f..e1580fe 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -42,7 +42,7 @@
LOCAL_CPPFLAGS := $(benchmark_cppflags)
LOCAL_SRC_FILES := $(benchmarklib_src_files)
LOCAL_C_INCLUDES := $(benchmark_c_includes)
-LOCAL_STATIC_LIBRARIES := libutils
+LOCAL_STATIC_LIBRARIES := libbase
include $(BUILD_STATIC_LIBRARY)
# Only supported on linux systems.
@@ -55,7 +55,7 @@
LOCAL_SRC_FILES := $(benchmarklib_src_files)
LOCAL_C_INCLUDES := $(benchmark_c_includes)
LOCAL_MULTILIB := both
-LOCAL_STATIC_LIBRARIES := libutils
+LOCAL_STATIC_LIBRARIES := libbase
include $(BUILD_HOST_STATIC_LIBRARY)
endif
@@ -84,7 +84,7 @@
LOCAL_CFLAGS := $(benchmark_cflags)
LOCAL_CPPFLAGS := $(benchmark_cppflags)
LOCAL_SRC_FILES := $(benchmark_src_files)
-LOCAL_STATIC_LIBRARIES := libbenchmark libutils
+LOCAL_STATIC_LIBRARIES := libbenchmark libbase
include $(BUILD_EXECUTABLE)
# We don't build a static benchmark executable because it's not usually
@@ -106,7 +106,7 @@
LOCAL_CPPFLAGS := $(benchmark_cppflags)
LOCAL_LDFLAGS := -lrt
LOCAL_SRC_FILES := $(benchmark_src_files)
-LOCAL_STATIC_LIBRARIES := libbenchmark libutils
+LOCAL_STATIC_LIBRARIES := libbenchmark libbase
include $(BUILD_HOST_EXECUTABLE)
endif
diff --git a/benchmarks/Benchmark.cpp b/benchmarks/Benchmark.cpp
index 5ca1d47..ea6000f 100644
--- a/benchmarks/Benchmark.cpp
+++ b/benchmarks/Benchmark.cpp
@@ -24,7 +24,7 @@
#include <string>
#include <vector>
-#include <utils/stringprintf.h>
+#include <base/stringprintf.h>
#include <benchmark/Benchmark.h>
@@ -108,7 +108,7 @@
template <>
std::string BenchmarkWithArg<double>::GetNameStr(double arg) {
- return Name() + "/" + android::StringPrintf("%0.6f", arg);
+ return Name() + "/" + android::base::StringPrintf("%0.6f", arg);
}
template<typename T>
diff --git a/libc/Android.mk b/libc/Android.mk
index cb1d8c0..7bbdd99 100644
--- a/libc/Android.mk
+++ b/libc/Android.mk
@@ -1324,6 +1324,10 @@
LOCAL_CFLAGS := $(libc_common_cflags)
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
+
+# TODO: This is to work around b/19059885. Remove after root cause is fixed
+LOCAL_LDFLAGS_arm := -Wl,--hash-style=sysv
+
LOCAL_C_INCLUDES := $(libc_common_c_includes)
LOCAL_SRC_FILES := \
$(libc_arch_dynamic_src_files) \
@@ -1474,6 +1478,10 @@
LOCAL_C_INCLUDES := $(libc_common_c_includes) bionic/libstdc++/include
LOCAL_CFLAGS := $(libc_common_cflags)
LOCAL_CPPFLAGS := $(libc_common_cppflags)
+
+# TODO: This is to work around b/19059885. Remove after root cause is fixed
+LOCAL_LDFLAGS_arm := -Wl,--hash-style=both
+
LOCAL_SRC_FILES := $(libstdcxx_common_src_files)
LOCAL_MODULE:= libstdc++
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
diff --git a/libc/bionic/pthread_cond.cpp b/libc/bionic/pthread_cond.cpp
index 5542c59..95a433c 100644
--- a/libc/bionic/pthread_cond.cpp
+++ b/libc/bionic/pthread_cond.cpp
@@ -41,6 +41,13 @@
#include "private/bionic_time_conversions.h"
#include "private/bionic_tls.h"
+// XXX *technically* there is a race condition that could allow
+// XXX a signal to be missed. If thread A is preempted in _wait()
+// XXX after unlocking the mutex and before waiting, and if other
+// XXX threads call signal or broadcast UINT_MAX/2 times (exactly),
+// XXX before thread A is scheduled again and calls futex_wait(),
+// XXX then the signal will be lost.
+
// We use one bit in pthread_condattr_t (long) values as the 'shared' flag
// and one bit for the clock type (CLOCK_REALTIME is ((clockid_t) 1), and
// CLOCK_MONOTONIC is ((clockid_t) 0).). The rest of the bits are a counter.
@@ -57,7 +64,6 @@
#define COND_GET_CLOCK(c) (((c) & COND_CLOCK_MASK) >> 1)
#define COND_SET_CLOCK(attr, c) ((attr) | (c << 1))
-
int pthread_condattr_init(pthread_condattr_t* attr) {
*attr = 0;
*attr |= PTHREAD_PROCESS_PRIVATE;
@@ -98,47 +104,50 @@
return 0;
}
-static inline atomic_uint* COND_TO_ATOMIC_POINTER(pthread_cond_t* cond) {
- static_assert(sizeof(atomic_uint) == sizeof(cond->value),
- "cond->value should actually be atomic_uint in implementation.");
+struct pthread_cond_internal_t {
+ atomic_uint state;
- // We prefer casting to atomic_uint instead of declaring cond->value to be atomic_uint directly.
- // Because using the second method pollutes pthread.h, and causes an error when compiling libcxx.
- return reinterpret_cast<atomic_uint*>(&cond->value);
+ bool process_shared() {
+ return COND_IS_SHARED(atomic_load_explicit(&state, memory_order_relaxed));
+ }
+
+ int get_clock() {
+ return COND_GET_CLOCK(atomic_load_explicit(&state, memory_order_relaxed));
+ }
+
+#if defined(__LP64__)
+ char __reserved[44];
+#endif
+};
+
+static pthread_cond_internal_t* __get_internal_cond(pthread_cond_t* cond_interface) {
+ static_assert(sizeof(pthread_cond_t) == sizeof(pthread_cond_internal_t),
+ "pthread_cond_t should actually be pthread_cond_internal_t in implementation.");
+ return reinterpret_cast<pthread_cond_internal_t*>(cond_interface);
}
-// XXX *technically* there is a race condition that could allow
-// XXX a signal to be missed. If thread A is preempted in _wait()
-// XXX after unlocking the mutex and before waiting, and if other
-// XXX threads call signal or broadcast UINT_MAX/2 times (exactly),
-// XXX before thread A is scheduled again and calls futex_wait(),
-// XXX then the signal will be lost.
+int pthread_cond_init(pthread_cond_t* cond_interface, const pthread_condattr_t* attr) {
+ pthread_cond_internal_t* cond = __get_internal_cond(cond_interface);
-int pthread_cond_init(pthread_cond_t* cond, const pthread_condattr_t* attr) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- unsigned int init_value = 0;
-
+ unsigned int init_state = 0;
if (attr != NULL) {
- init_value = (*attr & COND_FLAGS_MASK);
+ init_state = (*attr & COND_FLAGS_MASK);
}
- atomic_init(cond_value_ptr, init_value);
+ atomic_init(&cond->state, init_state);
return 0;
}
-int pthread_cond_destroy(pthread_cond_t* cond) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- atomic_store_explicit(cond_value_ptr, 0xdeadc04d, memory_order_relaxed);
+int pthread_cond_destroy(pthread_cond_t* cond_interface) {
+ pthread_cond_internal_t* cond = __get_internal_cond(cond_interface);
+ atomic_store_explicit(&cond->state, 0xdeadc04d, memory_order_relaxed);
return 0;
}
// This function is used by pthread_cond_broadcast and
// pthread_cond_signal to atomically decrement the counter
// then wake up thread_count threads.
-static int __pthread_cond_pulse(atomic_uint* cond_value_ptr, int thread_count) {
- unsigned int old_value = atomic_load_explicit(cond_value_ptr, memory_order_relaxed);
- bool shared = COND_IS_SHARED(old_value);
-
+static int __pthread_cond_pulse(pthread_cond_internal_t* cond, int thread_count) {
// We don't use a release/seq_cst fence here. Because pthread_cond_wait/signal can't be
// used as a method for memory synchronization by itself. It should always be used with
// pthread mutexes. Note that Spurious wakeups from pthread_cond_wait/timedwait may occur,
@@ -149,20 +158,18 @@
// synchronization. And it doesn't help even if we use any fence here.
// The increase of value should leave flags alone, even if the value can overflows.
- atomic_fetch_add_explicit(cond_value_ptr, COND_COUNTER_STEP, memory_order_relaxed);
+ atomic_fetch_add_explicit(&cond->state, COND_COUNTER_STEP, memory_order_relaxed);
- __futex_wake_ex(cond_value_ptr, shared, thread_count);
+ __futex_wake_ex(&cond->state, cond->process_shared(), thread_count);
return 0;
}
-__LIBC_HIDDEN__
-int __pthread_cond_timedwait_relative(atomic_uint* cond_value_ptr, pthread_mutex_t* mutex,
- const timespec* reltime) {
- unsigned int old_value = atomic_load_explicit(cond_value_ptr, memory_order_relaxed);
- bool shared = COND_IS_SHARED(old_value);
+static int __pthread_cond_timedwait_relative(pthread_cond_internal_t* cond, pthread_mutex_t* mutex,
+ const timespec* rel_timeout_or_null) {
+ unsigned int old_state = atomic_load_explicit(&cond->state, memory_order_relaxed);
pthread_mutex_unlock(mutex);
- int status = __futex_wait_ex(cond_value_ptr, shared, old_value, reltime);
+ int status = __futex_wait_ex(&cond->state, cond->process_shared(), old_state, rel_timeout_or_null);
pthread_mutex_lock(mutex);
if (status == -ETIMEDOUT) {
@@ -171,67 +178,68 @@
return 0;
}
-__LIBC_HIDDEN__
-int __pthread_cond_timedwait(atomic_uint* cond_value_ptr, pthread_mutex_t* mutex,
- const timespec* abs_ts, clockid_t clock) {
+static int __pthread_cond_timedwait(pthread_cond_internal_t* cond, pthread_mutex_t* mutex,
+ const timespec* abs_timeout_or_null, clockid_t clock) {
timespec ts;
- timespec* tsp;
+ timespec* rel_timeout = NULL;
- if (abs_ts != NULL) {
- if (!timespec_from_absolute_timespec(ts, *abs_ts, clock)) {
+ if (abs_timeout_or_null != NULL) {
+ rel_timeout = &ts;
+ if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout_or_null, clock)) {
return ETIMEDOUT;
}
- tsp = &ts;
- } else {
- tsp = NULL;
}
- return __pthread_cond_timedwait_relative(cond_value_ptr, mutex, tsp);
+ return __pthread_cond_timedwait_relative(cond, mutex, rel_timeout);
}
-int pthread_cond_broadcast(pthread_cond_t* cond) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_pulse(cond_value_ptr, INT_MAX);
+int pthread_cond_broadcast(pthread_cond_t* cond_interface) {
+ return __pthread_cond_pulse(__get_internal_cond(cond_interface), INT_MAX);
}
-int pthread_cond_signal(pthread_cond_t* cond) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_pulse(cond_value_ptr, 1);
+int pthread_cond_signal(pthread_cond_t* cond_interface) {
+ return __pthread_cond_pulse(__get_internal_cond(cond_interface), 1);
}
-int pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait(cond_value_ptr, mutex, NULL,
- COND_GET_CLOCK(atomic_load_explicit(cond_value_ptr, memory_order_relaxed)));
+int pthread_cond_wait(pthread_cond_t* cond_interface, pthread_mutex_t* mutex) {
+ pthread_cond_internal_t* cond = __get_internal_cond(cond_interface);
+ return __pthread_cond_timedwait(cond, mutex, NULL, cond->get_clock());
}
-int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t * mutex, const timespec *abstime) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait(cond_value_ptr, mutex, abstime,
- COND_GET_CLOCK(atomic_load_explicit(cond_value_ptr, memory_order_relaxed)));
+int pthread_cond_timedwait(pthread_cond_t *cond_interface, pthread_mutex_t * mutex,
+ const timespec *abstime) {
+
+ pthread_cond_internal_t* cond = __get_internal_cond(cond_interface);
+ return __pthread_cond_timedwait(cond, mutex, abstime, cond->get_clock());
}
#if !defined(__LP64__)
// TODO: this exists only for backward binary compatibility on 32 bit platforms.
-extern "C" int pthread_cond_timedwait_monotonic(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait(cond_value_ptr, mutex, abstime, CLOCK_MONOTONIC);
+extern "C" int pthread_cond_timedwait_monotonic(pthread_cond_t* cond_interface,
+ pthread_mutex_t* mutex,
+ const timespec* abs_timeout) {
+
+ return __pthread_cond_timedwait(__get_internal_cond(cond_interface), mutex, abs_timeout,
+ CLOCK_MONOTONIC);
}
-extern "C" int pthread_cond_timedwait_monotonic_np(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* abstime) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait(cond_value_ptr, mutex, abstime, CLOCK_MONOTONIC);
+extern "C" int pthread_cond_timedwait_monotonic_np(pthread_cond_t* cond_interface,
+ pthread_mutex_t* mutex,
+ const timespec* abs_timeout) {
+ return pthread_cond_timedwait_monotonic(cond_interface, mutex, abs_timeout);
}
-extern "C" int pthread_cond_timedwait_relative_np(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* reltime) {
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait_relative(cond_value_ptr, mutex, reltime);
+extern "C" int pthread_cond_timedwait_relative_np(pthread_cond_t* cond_interface,
+ pthread_mutex_t* mutex,
+ const timespec* rel_timeout) {
+
+ return __pthread_cond_timedwait_relative(__get_internal_cond(cond_interface), mutex, rel_timeout);
}
-extern "C" int pthread_cond_timeout_np(pthread_cond_t* cond, pthread_mutex_t* mutex, unsigned ms) {
+extern "C" int pthread_cond_timeout_np(pthread_cond_t* cond_interface,
+ pthread_mutex_t* mutex, unsigned ms) {
timespec ts;
timespec_from_ms(ts, ms);
- atomic_uint* cond_value_ptr = COND_TO_ATOMIC_POINTER(cond);
- return __pthread_cond_timedwait_relative(cond_value_ptr, mutex, &ts);
+ return pthread_cond_timedwait_relative_np(cond_interface, mutex, &ts);
}
#endif // !defined(__LP64__)
diff --git a/libc/bionic/pthread_mutex.cpp b/libc/bionic/pthread_mutex.cpp
index 83d6b54..f110782 100644
--- a/libc/bionic/pthread_mutex.cpp
+++ b/libc/bionic/pthread_mutex.cpp
@@ -237,7 +237,7 @@
return 0;
}
-static inline atomic_int* MUTEX_TO_ATOMIC_POINTER(pthread_mutex_t* mutex) {
+static inline atomic_int* get_mutex_value_pointer(pthread_mutex_t* mutex) {
static_assert(sizeof(atomic_int) == sizeof(mutex->value),
"mutex->value should actually be atomic_int in implementation.");
@@ -247,7 +247,7 @@
}
int pthread_mutex_init(pthread_mutex_t* mutex, const pthread_mutexattr_t* attr) {
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
if (__predict_true(attr == NULL)) {
atomic_init(mutex_value_ptr, MUTEX_TYPE_BITS_NORMAL);
@@ -277,6 +277,19 @@
return 0;
}
+static inline int __pthread_normal_mutex_trylock(atomic_int* mutex_value_ptr, int shared) {
+ const int unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
+ const int locked_uncontended = shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
+
+ int mvalue = unlocked;
+ if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue,
+ locked_uncontended,
+ memory_order_acquire,
+ memory_order_relaxed))) {
+ return 0;
+ }
+ return EBUSY;
+}
/*
* Lock a mutex of type NORMAL.
@@ -290,25 +303,17 @@
* "type" value is zero, so the only bits that will be set are the ones in
* the lock state field.
*/
-static inline void _normal_mutex_lock(atomic_int* mutex_value_ptr, int shared) {
- /* convenience shortcuts */
- const int unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
- const int locked_uncontended = shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
-
- // The common case is an unlocked mutex, so we begin by trying to
- // change the lock's state from unlocked to locked_uncontended.
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
- int mvalue = unlocked;
- if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue,
- locked_uncontended,
- memory_order_acquire,
- memory_order_relaxed))) {
- return;
+static inline int __pthread_normal_mutex_lock(atomic_int* mutex_value_ptr, int shared,
+ const timespec* abs_timeout_or_null, clockid_t clock) {
+ if (__predict_true(__normal_mutex_trylock(mutex_value_ptr, shared) == 0)) {
+ return 0;
}
ScopedTrace trace("Contending for pthread mutex");
+ const int unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
+ const int locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
+
// We want to go to sleep until the mutex is available, which requires
// promoting it to locked_contended. We need to swap in the new state
// value and then wait until somebody wakes us up.
@@ -316,20 +321,29 @@
// If it returns unlocked, we have acquired the lock, otherwise another
// thread still holds the lock and we should wait again.
// If lock is acquired, an acquire fence is needed to make all memory accesses
- // made by other threads visible in current CPU.
- const int locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
+ // made by other threads visible to the current CPU.
while (atomic_exchange_explicit(mutex_value_ptr, locked_contended,
memory_order_acquire) != unlocked) {
-
- __futex_wait_ex(mutex_value_ptr, shared, locked_contended, NULL);
+ timespec ts;
+ timespec* rel_timeout = NULL;
+ if (abs_timeout_or_null != NULL) {
+ rel_timeout = &ts;
+ if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout_or_null, clock)) {
+ return ETIMEDOUT;
+ }
+ }
+ if (__futex_wait_ex(mutex_value_ptr, shared, locked_contended, rel_timeout) == -ETIMEDOUT) {
+ return ETIMEDOUT;
+ }
}
+ return 0;
}
/*
* Release a mutex of type NORMAL. The caller is responsible for determining
* that we are in fact the owner of this lock.
*/
-static inline void _normal_mutex_unlock(atomic_int* mutex_value_ptr, int shared) {
+static inline void __pthread_normal_mutex_unlock(atomic_int* mutex_value_ptr, int shared) {
const int unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
const int locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
@@ -362,25 +376,13 @@
}
}
-/* This common inlined function is used to increment the counter of an
- * errorcheck or recursive mutex.
+/* This common inlined function is used to increment the counter of a recursive mutex.
*
- * For errorcheck mutexes, it will return EDEADLK
- * If the counter overflows, it will return EAGAIN
- * Otherwise, it atomically increments the counter and returns 0
- * after providing an acquire barrier.
+ * If the counter overflows, it will return EAGAIN.
+ * Otherwise, it atomically increments the counter and returns 0.
*
- * mtype is the current mutex type
- * mvalue is the current mutex value (already loaded)
- * mutex pointers to the mutex.
*/
-static inline __always_inline
-int _recursive_increment(atomic_int* mutex_value_ptr, int mvalue, int mtype) {
- if (mtype == MUTEX_TYPE_BITS_ERRORCHECK) {
- // Trying to re-lock a mutex we already acquired.
- return EDEADLK;
- }
-
+static inline int __recursive_increment(atomic_int* mutex_value_ptr, int mvalue) {
// Detect recursive lock overflow and return EAGAIN.
// This is safe because only the owner thread can modify the
// counter bits in the mutex value.
@@ -393,15 +395,13 @@
// loop to update the counter. The counter will not overflow in the loop,
// as only the owner thread can change it.
// The mutex is still locked, so we don't need a release fence.
- while (!atomic_compare_exchange_weak_explicit(mutex_value_ptr, &mvalue,
- mvalue + MUTEX_COUNTER_BITS_ONE,
- memory_order_relaxed,
- memory_order_relaxed)) { }
+ atomic_fetch_add_explicit(mutex_value_ptr, MUTEX_COUNTER_BITS_ONE, memory_order_relaxed);
return 0;
}
-int pthread_mutex_lock(pthread_mutex_t* mutex) {
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
+static int __pthread_mutex_lock_with_timeout(pthread_mutex_t* mutex,
+ const timespec* abs_timeout_or_null, clockid_t clock) {
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
int mvalue, mtype, tid, shared;
@@ -411,24 +411,28 @@
// Handle common case first.
if ( __predict_true(mtype == MUTEX_TYPE_BITS_NORMAL) ) {
- _normal_mutex_lock(mutex_value_ptr, shared);
- return 0;
+ return __pthread_normal_mutex_lock(mutex_value_ptr, shared, abs_timeout_or_null, clock);
}
// Do we already own this recursive or error-check mutex?
tid = __get_thread()->tid;
- if ( tid == MUTEX_OWNER_FROM_BITS(mvalue) )
- return _recursive_increment(mutex_value_ptr, mvalue, mtype);
+ if (tid == MUTEX_OWNER_FROM_BITS(mvalue)) {
+ if (mtype == MUTEX_TYPE_BITS_ERRORCHECK) {
+ return EDEADLK;
+ }
+ return __recursive_increment(mutex_value_ptr, mvalue);
+ }
- // Add in shared state to avoid extra 'or' operations below.
- mtype |= shared;
+ const int unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
+ const int locked_uncontended = mtype | shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
+ const int locked_contended = mtype | shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
// First, if the mutex is unlocked, try to quickly acquire it.
// In the optimistic case where this works, set the state to locked_uncontended.
- if (mvalue == mtype) {
- int newval = MUTEX_OWNER_TO_BITS(tid) | mtype | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
+ if (mvalue == unlocked) {
+ int newval = MUTEX_OWNER_TO_BITS(tid) | locked_uncontended;
+ // If exchanged successfully, an acquire fence is required to make
+ // all memory accesses made by other threads visible to the current CPU.
if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue,
newval, memory_order_acquire, memory_order_relaxed))) {
return 0;
@@ -438,16 +442,14 @@
ScopedTrace trace("Contending for pthread mutex");
while (true) {
- if (mvalue == mtype) {
- // If the mutex is unlocked, its value should be 'mtype' and
- // we try to acquire it by setting its owner and state atomically.
+ if (mvalue == unlocked) {
// NOTE: We put the state to locked_contended since we _know_ there
// is contention when we are in this loop. This ensures all waiters
// will be unlocked.
- int newval = MUTEX_OWNER_TO_BITS(tid) | mtype | MUTEX_STATE_BITS_LOCKED_CONTENDED;
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
+ int newval = MUTEX_OWNER_TO_BITS(tid) | locked_contended;
+ // If exchanged successfully, an acquire fence is required to make
+ // all memory accesses made by other threads visible to the current CPU.
if (__predict_true(atomic_compare_exchange_weak_explicit(mutex_value_ptr,
&mvalue, newval,
memory_order_acquire,
@@ -456,8 +458,7 @@
}
continue;
} else if (MUTEX_STATE_BITS_IS_LOCKED_UNCONTENDED(mvalue)) {
- // The mutex is already locked by another thread, if the state is locked_uncontended,
- // we should set it to locked_contended beforing going to sleep. This can make
+ // We should set it to locked_contended beforing going to sleep. This can make
// sure waiters will be woken up eventually.
int newval = MUTEX_STATE_BITS_FLIP_CONTENTION(mvalue);
@@ -470,14 +471,39 @@
mvalue = newval;
}
- // We are in locked_contended state, sleep until someone wake us up.
- __futex_wait_ex(mutex_value_ptr, shared, mvalue, NULL);
+ // We are in locked_contended state, sleep until someone wakes us up.
+ timespec ts;
+ timespec* rel_timeout = NULL;
+ if (abs_timeout_or_null != NULL) {
+ rel_timeout = &ts;
+ if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout_or_null, clock)) {
+ return ETIMEDOUT;
+ }
+ }
+ if (__futex_wait_ex(mutex_value_ptr, shared, mvalue, rel_timeout) == -ETIMEDOUT) {
+ return ETIMEDOUT;
+ }
mvalue = atomic_load_explicit(mutex_value_ptr, memory_order_relaxed);
}
}
+int pthread_mutex_lock(pthread_mutex_t* mutex) {
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
+
+ int mvalue = atomic_load_explicit(mutex_value_ptr, memory_order_relaxed);
+ int mtype = (mvalue & MUTEX_TYPE_MASK);
+ int shared = (mvalue & MUTEX_SHARED_MASK);
+ // Avoid slowing down fast path of normal mutex lock operation.
+ if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) {
+ if (__predict_true(__pthread_normal_mutex_trylock(mutex_value_ptr, shared) == 0)) {
+ return 0;
+ }
+ }
+ return __pthread_mutex_lock_with_timeout(mutex, NULL, 0);
+}
+
int pthread_mutex_unlock(pthread_mutex_t* mutex) {
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
int mvalue, mtype, tid, shared;
@@ -487,7 +513,7 @@
// Handle common case first.
if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) {
- _normal_mutex_unlock(mutex_value_ptr, shared);
+ __pthread_normal_mutex_unlock(mutex_value_ptr, shared);
return 0;
}
@@ -501,10 +527,7 @@
// lower state bits), use a compare_exchange loop to do it.
if (!MUTEX_COUNTER_BITS_IS_ZERO(mvalue)) {
// We still own the mutex, so a release fence is not needed.
- while (!atomic_compare_exchange_weak_explicit(mutex_value_ptr, &mvalue,
- mvalue - MUTEX_COUNTER_BITS_ONE,
- memory_order_relaxed,
- memory_order_relaxed)) { }
+ atomic_fetch_sub_explicit(mutex_value_ptr, MUTEX_COUNTER_BITS_ONE, memory_order_relaxed);
return 0;
}
@@ -514,9 +537,8 @@
// to awake.
// A release fence is required to make previous stores visible to next
// lock owner threads.
- mvalue = atomic_exchange_explicit(mutex_value_ptr,
- mtype | shared | MUTEX_STATE_BITS_UNLOCKED,
- memory_order_release);
+ const int unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
+ mvalue = atomic_exchange_explicit(mutex_value_ptr, unlocked, memory_order_release);
if (MUTEX_STATE_BITS_IS_LOCKED_CONTENDED(mvalue)) {
__futex_wake_ex(mutex_value_ptr, shared, 1);
}
@@ -525,25 +547,18 @@
}
int pthread_mutex_trylock(pthread_mutex_t* mutex) {
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
int mvalue = atomic_load_explicit(mutex_value_ptr, memory_order_relaxed);
int mtype = (mvalue & MUTEX_TYPE_MASK);
int shared = (mvalue & MUTEX_SHARED_MASK);
+ const int unlocked = mtype | shared | MUTEX_STATE_BITS_UNLOCKED;
+ const int locked_uncontended = mtype | shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
+
// Handle common case first.
if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) {
- mvalue = shared | MUTEX_STATE_BITS_UNLOCKED;
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
- if (atomic_compare_exchange_strong_explicit(mutex_value_ptr,
- &mvalue,
- shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED,
- memory_order_acquire,
- memory_order_relaxed)) {
- return 0;
- }
- return EBUSY;
+ return __pthread_normal_mutex_trylock(mutex_value_ptr, shared);
}
// Do we already own this recursive or error-check mutex?
@@ -552,19 +567,17 @@
if (mtype == MUTEX_TYPE_BITS_ERRORCHECK) {
return EBUSY;
}
- return _recursive_increment(mutex_value_ptr, mvalue, mtype);
+ return __recursive_increment(mutex_value_ptr, mvalue);
}
// Same as pthread_mutex_lock, except that we don't want to wait, and
// the only operation that can succeed is a single compare_exchange to acquire the
// lock if it is released / not owned by anyone. No need for a complex loop.
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
- mtype |= shared | MUTEX_STATE_BITS_UNLOCKED;
- mvalue = MUTEX_OWNER_TO_BITS(tid) | mtype | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
-
- if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr,
- &mtype, mvalue,
+ // If exchanged successfully, an acquire fence is required to make
+ // all memory accesses made by other threads visible to the current CPU.
+ mvalue = unlocked;
+ int newval = MUTEX_OWNER_TO_BITS(tid) | locked_uncontended;
+ if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue, newval,
memory_order_acquire,
memory_order_relaxed))) {
return 0;
@@ -572,112 +585,6 @@
return EBUSY;
}
-static int __pthread_mutex_timedlock(pthread_mutex_t* mutex, const timespec* abs_ts, clockid_t clock) {
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
-
- timespec ts;
-
- int mvalue = atomic_load_explicit(mutex_value_ptr, memory_order_relaxed);
- int mtype = (mvalue & MUTEX_TYPE_MASK);
- int shared = (mvalue & MUTEX_SHARED_MASK);
-
- // Handle common case first.
- if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) {
- const int unlocked = shared | MUTEX_STATE_BITS_UNLOCKED;
- const int locked_uncontended = shared | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
- const int locked_contended = shared | MUTEX_STATE_BITS_LOCKED_CONTENDED;
-
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
- mvalue = unlocked;
- if (atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue, locked_uncontended,
- memory_order_acquire, memory_order_relaxed)) {
- return 0;
- }
-
- ScopedTrace trace("Contending for timed pthread mutex");
-
- // Same as pthread_mutex_lock, except that we can only wait for a specified
- // time interval. If lock is acquired, an acquire fence is needed to make
- // all memory accesses made by other threads visible in current CPU.
- while (atomic_exchange_explicit(mutex_value_ptr, locked_contended,
- memory_order_acquire) != unlocked) {
- if (!timespec_from_absolute_timespec(ts, *abs_ts, clock)) {
- return ETIMEDOUT;
- }
- __futex_wait_ex(mutex_value_ptr, shared, locked_contended, &ts);
- }
-
- return 0;
- }
-
- // Do we already own this recursive or error-check mutex?
- pid_t tid = __get_thread()->tid;
- if (tid == MUTEX_OWNER_FROM_BITS(mvalue)) {
- return _recursive_increment(mutex_value_ptr, mvalue, mtype);
- }
-
- mtype |= shared;
-
- // First try a quick lock.
- if (mvalue == mtype) {
- int newval = MUTEX_OWNER_TO_BITS(tid) | mtype | MUTEX_STATE_BITS_LOCKED_UNCONTENDED;
- // If exchanged successfully, An acquire fence is required to make
- // all memory accesses made by other threads visible in current CPU.
- if (__predict_true(atomic_compare_exchange_strong_explicit(mutex_value_ptr,
- &mvalue, newval,
- memory_order_acquire,
- memory_order_relaxed))) {
- return 0;
- }
- }
-
- ScopedTrace trace("Contending for timed pthread mutex");
-
- // The following implements the same loop as pthread_mutex_lock,
- // but adds checks to ensure that the operation never exceeds the
- // absolute expiration time.
- while (true) {
- if (mvalue == mtype) { // Unlocked.
- int newval = MUTEX_OWNER_TO_BITS(tid) | mtype | MUTEX_STATE_BITS_LOCKED_CONTENDED;
- // An acquire fence is needed for successful exchange.
- if (!atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue, newval,
- memory_order_acquire,
- memory_order_relaxed)) {
- goto check_time;
- }
-
- return 0;
- } else if (MUTEX_STATE_BITS_IS_LOCKED_UNCONTENDED(mvalue)) {
- // The value is locked. If the state is locked_uncontended, we need to switch
- // it to locked_contended before sleep, so we can get woken up later.
- int newval = MUTEX_STATE_BITS_FLIP_CONTENTION(mvalue);
- if (!atomic_compare_exchange_strong_explicit(mutex_value_ptr, &mvalue, newval,
- memory_order_relaxed,
- memory_order_relaxed)) {
- goto check_time;
- }
- mvalue = newval;
- }
-
- if (!timespec_from_absolute_timespec(ts, *abs_ts, clock)) {
- return ETIMEDOUT;
- }
-
- if (__futex_wait_ex(mutex_value_ptr, shared, mvalue, &ts) == -ETIMEDOUT) {
- return ETIMEDOUT;
- }
-
-check_time:
- if (!timespec_from_absolute_timespec(ts, *abs_ts, clock)) {
- return ETIMEDOUT;
- }
- // After futex_wait or time costly timespec_from_absolte_timespec,
- // we'd better read mvalue again in case it is changed.
- mvalue = atomic_load_explicit(mutex_value_ptr, memory_order_relaxed);
- }
-}
-
#if !defined(__LP64__)
extern "C" int pthread_mutex_lock_timeout_np(pthread_mutex_t* mutex, unsigned ms) {
timespec abs_timeout;
@@ -689,7 +596,7 @@
abs_timeout.tv_nsec -= NS_PER_S;
}
- int error = __pthread_mutex_timedlock(mutex, &abs_timeout, CLOCK_MONOTONIC);
+ int error = __pthread_mutex_lock_with_timeout(mutex, &abs_timeout, CLOCK_MONOTONIC);
if (error == ETIMEDOUT) {
error = EBUSY;
}
@@ -698,7 +605,7 @@
#endif
int pthread_mutex_timedlock(pthread_mutex_t* mutex, const timespec* abs_timeout) {
- return __pthread_mutex_timedlock(mutex, abs_timeout, CLOCK_REALTIME);
+ return __pthread_mutex_lock_with_timeout(mutex, abs_timeout, CLOCK_REALTIME);
}
int pthread_mutex_destroy(pthread_mutex_t* mutex) {
@@ -708,7 +615,7 @@
return error;
}
- atomic_int* mutex_value_ptr = MUTEX_TO_ATOMIC_POINTER(mutex);
+ atomic_int* mutex_value_ptr = get_mutex_value_pointer(mutex);
atomic_store_explicit(mutex_value_ptr, 0xdead10cc, memory_order_relaxed);
return 0;
}
diff --git a/libc/bionic/pthread_rwlock.cpp b/libc/bionic/pthread_rwlock.cpp
index 83243ab..f089940 100644
--- a/libc/bionic/pthread_rwlock.cpp
+++ b/libc/bionic/pthread_rwlock.cpp
@@ -62,18 +62,6 @@
#define RWLOCKATTR_DEFAULT 0
#define RWLOCKATTR_SHARED_MASK 0x0010
-static inline bool rwlock_is_shared(const pthread_rwlock_t* rwlock) {
- return rwlock->attr == PTHREAD_PROCESS_SHARED;
-}
-
-static bool timespec_from_absolute(timespec* rel_timeout, const timespec* abs_timeout) {
- if (abs_timeout != NULL) {
- if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout, CLOCK_REALTIME)) {
- return false;
- }
- }
- return true;
-}
int pthread_rwlockattr_init(pthread_rwlockattr_t* attr) {
*attr = PTHREAD_PROCESS_PRIVATE;
@@ -101,37 +89,33 @@
return 0;
}
-static inline atomic_int* STATE_ATOMIC_POINTER(pthread_rwlock_t* rwlock) {
- static_assert(sizeof(atomic_int) == sizeof(rwlock->state),
- "rwlock->state should actually be atomic_int in implementation.");
+struct pthread_rwlock_internal_t {
+ atomic_int state; // 0=unlock, -1=writer lock, +n=reader lock
+ atomic_int writer_thread_id;
+ atomic_uint pending_readers;
+ atomic_uint pending_writers;
+ int32_t attr;
- // We prefer casting to atomic_int instead of declaring rwlock->state to be atomic_int directly.
- // Because using the second method pollutes pthread.h, and causes an error when compiling libcxx.
- return reinterpret_cast<atomic_int*>(&rwlock->state);
+ bool process_shared() const {
+ return attr == PTHREAD_PROCESS_SHARED;
+ }
+
+#if defined(__LP64__)
+ char __reserved[36];
+#else
+ char __reserved[20];
+#endif
+};
+
+static inline pthread_rwlock_internal_t* __get_internal_rwlock(pthread_rwlock_t* rwlock_interface) {
+ static_assert(sizeof(pthread_rwlock_t) == sizeof(pthread_rwlock_internal_t),
+ "pthread_rwlock_t should actually be pthread_rwlock_internal_t in implementation.");
+ return reinterpret_cast<pthread_rwlock_internal_t*>(rwlock_interface);
}
-static inline atomic_int* WRITER_THREAD_ID_ATOMIC_POINTER(pthread_rwlock_t* rwlock) {
- static_assert(sizeof(atomic_int) == sizeof(rwlock->writer_thread_id),
- "rwlock->writer_thread_id should actually be atomic_int in implementation.");
+int pthread_rwlock_init(pthread_rwlock_t* rwlock_interface, const pthread_rwlockattr_t* attr) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
- return reinterpret_cast<atomic_int*>(&rwlock->writer_thread_id);
-}
-
-static inline atomic_uint* PENDING_READERS_ATOMIC_POINTER(pthread_rwlock_t* rwlock) {
- static_assert(sizeof(atomic_uint) == sizeof(rwlock->pending_readers),
- "rwlock->pending_readers should actually be atomic_uint in implementation.");
-
- return reinterpret_cast<atomic_uint*>(&rwlock->pending_readers);
-}
-
-static inline atomic_uint* PENDING_WRITERS_ATOMIC_POINTER(pthread_rwlock_t* rwlock) {
- static_assert(sizeof(atomic_uint) == sizeof(rwlock->pending_writers),
- "rwlock->pending_writers should actually be atomic_uint in implementation.");
-
- return reinterpret_cast<atomic_uint*>(&rwlock->pending_writers);
-}
-
-int pthread_rwlock_init(pthread_rwlock_t* rwlock, const pthread_rwlockattr_t* attr) {
if (__predict_true(attr == NULL)) {
rwlock->attr = 0;
} else {
@@ -145,53 +129,62 @@
}
}
- atomic_init(STATE_ATOMIC_POINTER(rwlock), 0);
- atomic_init(WRITER_THREAD_ID_ATOMIC_POINTER(rwlock), 0);
- atomic_init(PENDING_READERS_ATOMIC_POINTER(rwlock), 0);
- atomic_init(PENDING_WRITERS_ATOMIC_POINTER(rwlock), 0);
+ atomic_init(&rwlock->state, 0);
+ atomic_init(&rwlock->writer_thread_id, 0);
+ atomic_init(&rwlock->pending_readers, 0);
+ atomic_init(&rwlock->pending_writers, 0);
return 0;
}
-int pthread_rwlock_destroy(pthread_rwlock_t* rwlock) {
- if (rwlock->state != 0) {
+int pthread_rwlock_destroy(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
+
+ if (atomic_load_explicit(&rwlock->state, memory_order_relaxed) != 0) {
return EBUSY;
}
return 0;
}
-static int __pthread_rwlock_timedrdlock(pthread_rwlock_t* rwlock, const timespec* abs_timeout) {
- if (__predict_false(__get_thread()->tid ==
- atomic_load_explicit(WRITER_THREAD_ID_ATOMIC_POINTER(rwlock), memory_order_relaxed))) {
+static int __pthread_rwlock_timedrdlock(pthread_rwlock_internal_t* rwlock,
+ const timespec* abs_timeout_or_null) {
+
+ if (__predict_false(__get_thread()->tid == atomic_load_explicit(&rwlock->writer_thread_id,
+ memory_order_relaxed))) {
return EDEADLK;
}
- timespec ts;
- timespec* rel_timeout = (abs_timeout == NULL) ? NULL : &ts;
-
- atomic_int* state_ptr = STATE_ATOMIC_POINTER(rwlock);
-
while (true) {
- int cur_state = atomic_load_explicit(state_ptr, memory_order_relaxed);
- if (__predict_true(cur_state >= 0)) {
- if (atomic_compare_exchange_weak_explicit(state_ptr, &cur_state, cur_state + 1,
+ int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed);
+ if (__predict_true(old_state >= 0)) {
+ if (atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, old_state + 1,
memory_order_acquire, memory_order_relaxed)) {
return 0;
}
} else {
- if (!timespec_from_absolute(rel_timeout, abs_timeout)) {
- return ETIMEDOUT;
+ timespec ts;
+ timespec* rel_timeout = NULL;
+
+ if (abs_timeout_or_null != NULL) {
+ rel_timeout = &ts;
+ if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout_or_null, CLOCK_REALTIME)) {
+ return ETIMEDOUT;
+ }
}
- atomic_uint* pending_readers_ptr = PENDING_READERS_ATOMIC_POINTER(rwlock);
// To avoid losing wake ups, the pending_readers increment should be observed before
// futex_wait by all threads. A seq_cst fence instead of a seq_cst operation is used
// here. Because only a seq_cst fence can ensure sequential consistency for non-atomic
// operations in futex_wait.
- atomic_fetch_add_explicit(pending_readers_ptr, 1, memory_order_relaxed);
+ atomic_fetch_add_explicit(&rwlock->pending_readers, 1, memory_order_relaxed);
+
atomic_thread_fence(memory_order_seq_cst);
- int ret = __futex_wait_ex(state_ptr, rwlock_is_shared(rwlock), cur_state, rel_timeout);
- atomic_fetch_sub_explicit(pending_readers_ptr, 1, memory_order_relaxed);
+
+ int ret = __futex_wait_ex(&rwlock->state, rwlock->process_shared(), old_state,
+ rel_timeout);
+
+ atomic_fetch_sub_explicit(&rwlock->pending_readers, 1, memory_order_relaxed);
+
if (ret == -ETIMEDOUT) {
return ETIMEDOUT;
}
@@ -199,44 +192,49 @@
}
}
-static int __pthread_rwlock_timedwrlock(pthread_rwlock_t* rwlock, const timespec* abs_timeout) {
- if (__predict_false(__get_thread()->tid ==
- atomic_load_explicit(WRITER_THREAD_ID_ATOMIC_POINTER(rwlock), memory_order_relaxed))) {
+static int __pthread_rwlock_timedwrlock(pthread_rwlock_internal_t* rwlock,
+ const timespec* abs_timeout_or_null) {
+
+ if (__predict_false(__get_thread()->tid == atomic_load_explicit(&rwlock->writer_thread_id,
+ memory_order_relaxed))) {
return EDEADLK;
}
- timespec ts;
- timespec* rel_timeout = (abs_timeout == NULL) ? NULL : &ts;
-
- atomic_int* state_ptr = STATE_ATOMIC_POINTER(rwlock);
-
while (true) {
- int cur_state = atomic_load_explicit(state_ptr, memory_order_relaxed);
- if (__predict_true(cur_state == 0)) {
- if (atomic_compare_exchange_weak_explicit(state_ptr, &cur_state, -1,
+ int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed);
+ if (__predict_true(old_state == 0)) {
+ if (atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, -1,
memory_order_acquire, memory_order_relaxed)) {
// writer_thread_id is protected by rwlock and can only be modified in rwlock write
// owner thread. Other threads may read it for EDEADLK error checking, atomic operation
// is safe enough for it.
- atomic_store_explicit(WRITER_THREAD_ID_ATOMIC_POINTER(rwlock), __get_thread()->tid,
- memory_order_relaxed);
+ atomic_store_explicit(&rwlock->writer_thread_id, __get_thread()->tid, memory_order_relaxed);
return 0;
}
} else {
- if (!timespec_from_absolute(rel_timeout, abs_timeout)) {
- return ETIMEDOUT;
- }
+ timespec ts;
+ timespec* rel_timeout = NULL;
- atomic_uint* pending_writers_ptr = PENDING_WRITERS_ATOMIC_POINTER(rwlock);
+ if (abs_timeout_or_null != NULL) {
+ rel_timeout = &ts;
+ if (!timespec_from_absolute_timespec(*rel_timeout, *abs_timeout_or_null, CLOCK_REALTIME)) {
+ return ETIMEDOUT;
+ }
+ }
// To avoid losing wake ups, the pending_writers increment should be observed before
// futex_wait by all threads. A seq_cst fence instead of a seq_cst operation is used
// here. Because only a seq_cst fence can ensure sequential consistency for non-atomic
// operations in futex_wait.
- atomic_fetch_add_explicit(pending_writers_ptr, 1, memory_order_relaxed);
+ atomic_fetch_add_explicit(&rwlock->pending_writers, 1, memory_order_relaxed);
+
atomic_thread_fence(memory_order_seq_cst);
- int ret = __futex_wait_ex(state_ptr, rwlock_is_shared(rwlock), cur_state, rel_timeout);
- atomic_fetch_sub_explicit(pending_writers_ptr, 1, memory_order_relaxed);
+
+ int ret = __futex_wait_ex(&rwlock->state, rwlock->process_shared(), old_state,
+ rel_timeout);
+
+ atomic_fetch_sub_explicit(&rwlock->pending_writers, 1, memory_order_relaxed);
+
if (ret == -ETIMEDOUT) {
return ETIMEDOUT;
}
@@ -244,86 +242,87 @@
}
}
-int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock) {
+int pthread_rwlock_rdlock(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
+
return __pthread_rwlock_timedrdlock(rwlock, NULL);
}
-int pthread_rwlock_timedrdlock(pthread_rwlock_t* rwlock, const timespec* abs_timeout) {
+int pthread_rwlock_timedrdlock(pthread_rwlock_t* rwlock_interface, const timespec* abs_timeout) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
+
return __pthread_rwlock_timedrdlock(rwlock, abs_timeout);
}
-int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock) {
- atomic_int* state_ptr = STATE_ATOMIC_POINTER(rwlock);
- int cur_state = atomic_load_explicit(state_ptr, memory_order_relaxed);
+int pthread_rwlock_tryrdlock(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
- while (cur_state >= 0) {
- if (atomic_compare_exchange_weak_explicit(state_ptr, &cur_state, cur_state + 1,
- memory_order_acquire, memory_order_relaxed)) {
- return 0;
- }
+ int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed);
+
+ while (old_state >= 0 && !atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state,
+ old_state + 1, memory_order_acquire, memory_order_relaxed)) {
}
- return EBUSY;
+ return (old_state >= 0) ? 0 : EBUSY;
}
-int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock) {
+int pthread_rwlock_wrlock(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
+
return __pthread_rwlock_timedwrlock(rwlock, NULL);
}
-int pthread_rwlock_timedwrlock(pthread_rwlock_t* rwlock, const timespec* abs_timeout) {
+int pthread_rwlock_timedwrlock(pthread_rwlock_t* rwlock_interface, const timespec* abs_timeout) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
+
return __pthread_rwlock_timedwrlock(rwlock, abs_timeout);
}
-int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock) {
- atomic_int* state_ptr = STATE_ATOMIC_POINTER(rwlock);
- int cur_state = atomic_load_explicit(state_ptr, memory_order_relaxed);
+int pthread_rwlock_trywrlock(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
- while (cur_state == 0) {
- if (atomic_compare_exchange_weak_explicit(state_ptr, &cur_state, -1,
+ int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed);
+
+ while (old_state == 0 && !atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, -1,
memory_order_acquire, memory_order_relaxed)) {
- int tid = __get_thread()->tid;
- atomic_store_explicit(WRITER_THREAD_ID_ATOMIC_POINTER(rwlock), tid, memory_order_relaxed);
- return 0;
- }
+ }
+ if (old_state == 0) {
+ atomic_store_explicit(&rwlock->writer_thread_id, __get_thread()->tid, memory_order_relaxed);
+ return 0;
}
return EBUSY;
}
-int pthread_rwlock_unlock(pthread_rwlock_t* rwlock) {
- int tid = __get_thread()->tid;
- atomic_int* state_ptr = STATE_ATOMIC_POINTER(rwlock);
- atomic_uint* pending_readers_ptr = PENDING_READERS_ATOMIC_POINTER(rwlock);
- atomic_uint* pending_writers_ptr = PENDING_WRITERS_ATOMIC_POINTER(rwlock);
+int pthread_rwlock_unlock(pthread_rwlock_t* rwlock_interface) {
+ pthread_rwlock_internal_t* rwlock = __get_internal_rwlock(rwlock_interface);
- int cur_state = atomic_load_explicit(state_ptr, memory_order_relaxed);
- if (__predict_false(cur_state == 0)) {
+ int old_state = atomic_load_explicit(&rwlock->state, memory_order_relaxed);
+ if (__predict_false(old_state == 0)) {
return EPERM;
- } else if (cur_state == -1) {
- atomic_int* writer_thread_id_ptr = WRITER_THREAD_ID_ATOMIC_POINTER(rwlock);
- if (atomic_load_explicit(writer_thread_id_ptr, memory_order_relaxed) != tid) {
+ } else if (old_state == -1) {
+ if (atomic_load_explicit(&rwlock->writer_thread_id, memory_order_relaxed) != __get_thread()->tid) {
return EPERM;
}
// We're no longer the owner.
- atomic_store_explicit(writer_thread_id_ptr, 0, memory_order_relaxed);
+ atomic_store_explicit(&rwlock->writer_thread_id, 0, memory_order_relaxed);
// Change state from -1 to 0.
- atomic_store_explicit(state_ptr, 0, memory_order_release);
- goto wakeup_waiters;
+ atomic_store_explicit(&rwlock->state, 0, memory_order_release);
- } else { // cur_state > 0
+ } else { // old_state > 0
// Reduce state by 1.
- while (!atomic_compare_exchange_weak_explicit(state_ptr, &cur_state, cur_state - 1,
- memory_order_release, memory_order_relaxed)) {
- if (cur_state <= 0) {
- return EPERM;
- }
+ while (old_state > 0 && !atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state,
+ old_state - 1, memory_order_release, memory_order_relaxed)) {
}
- if (cur_state == 1) {
- goto wakeup_waiters;
- }
- }
- return 0;
-wakeup_waiters:
+ if (old_state <= 0) {
+ return EPERM;
+ } else if (old_state > 1) {
+ return 0;
+ }
+ // old_state = 1, which means the last reader calling unlock. It has to wake up waiters.
+ }
+
+ // If having waiters, wake up them.
// To avoid losing wake ups, the update of state should be observed before reading
// pending_readers/pending_writers by all threads. Use read locking as an example:
// read locking thread unlocking thread
@@ -335,9 +334,9 @@
// in a situation that the locking thread reads state as negative and needs to wait,
// while the unlocking thread reads pending_readers as zero and doesn't need to wake up waiters.
atomic_thread_fence(memory_order_seq_cst);
- if (__predict_false(atomic_load_explicit(pending_readers_ptr, memory_order_relaxed) > 0 ||
- atomic_load_explicit(pending_writers_ptr, memory_order_relaxed) > 0)) {
- __futex_wake_ex(state_ptr, rwlock_is_shared(rwlock), INT_MAX);
+ if (__predict_false(atomic_load_explicit(&rwlock->pending_readers, memory_order_relaxed) > 0 ||
+ atomic_load_explicit(&rwlock->pending_writers, memory_order_relaxed) > 0)) {
+ __futex_wake_ex(&rwlock->state, rwlock->process_shared(), INT_MAX);
}
return 0;
}
diff --git a/libc/dns/resolv/res_send.c b/libc/dns/resolv/res_send.c
index 6439e31..a8da3ac 100644
--- a/libc/dns/resolv/res_send.c
+++ b/libc/dns/resolv/res_send.c
@@ -402,6 +402,10 @@
}
if (statp->nscount == 0) {
+ // We have no nameservers configured, so there's no point trying.
+ // Tell the cache the query failed, or any retries and anyone else asking the same
+ // question will block for PENDING_REQUEST_TIMEOUT seconds instead of failing fast.
+ _resolv_cache_query_failed(statp->netid, buf, buflen);
errno = ESRCH;
return (-1);
}
diff --git a/libc/include/elf.h b/libc/include/elf.h
index a41a244..ee53ad1 100644
--- a/libc/include/elf.h
+++ b/libc/include/elf.h
@@ -94,6 +94,13 @@
#define DT_PREINIT_ARRAY 32
#define DT_PREINIT_ARRAYSZ 33
+/* Android compressed rel/rela sections */
+#define DT_ANDROID_REL (DT_LOOS + 2)
+#define DT_ANDROID_RELSZ (DT_LOOS + 3)
+
+#define DT_ANDROID_RELA (DT_LOOS + 4)
+#define DT_ANDROID_RELASZ (DT_LOOS + 5)
+
/* gnu hash entry */
#define DT_GNU_HASH 0x6ffffef5
@@ -118,4 +125,8 @@
/* The kernel uses NT_PRFPREG but glibc also offers NT_FPREGSET */
#define NT_FPREGSET NT_PRFPREG
+#define ELF_NOTE_GNU "GNU"
+
+#define NT_GNU_BUILD_ID 3
+
#endif /* _ELF_H */
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 1fe61e2..09ea113 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -73,13 +73,14 @@
};
typedef struct {
- unsigned int value;
-#ifdef __LP64__
- char __reserved[44];
+#if defined(__LP64__)
+ char __private[48];
+#else
+ char __private[4];
#endif
-} pthread_cond_t;
+} pthread_cond_t __attribute__((aligned(sizeof(long))));
-#define PTHREAD_COND_INITIALIZER {0 __RESERVED_INITIALIZER}
+#define PTHREAD_COND_INITIALIZER { { 0 } }
typedef long pthread_mutexattr_t;
typedef long pthread_condattr_t;
@@ -87,28 +88,14 @@
typedef long pthread_rwlockattr_t;
typedef struct {
-#if !defined(__LP64__)
- pthread_mutex_t __unused_lock;
- pthread_cond_t __unused_cond;
-#endif
- int32_t state; // 0=unlock, -1=writer lock, +n=reader lock
- int32_t writer_thread_id;
- uint32_t pending_readers;
- uint32_t pending_writers;
- int32_t attr;
-#ifdef __LP64__
- char __reserved[36];
+#if defined(__LP64__)
+ char __private[56];
#else
- char __reserved[12];
+ char __private[40];
#endif
+} pthread_rwlock_t __attribute__((aligned(8)));
-} pthread_rwlock_t;
-
-#ifdef __LP64__
- #define PTHREAD_RWLOCK_INITIALIZER { 0, 0, 0, 0, 0, { 0 } }
-#else
- #define PTHREAD_RWLOCK_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0, 0, 0, 0, { 0 } }
-#endif
+#define PTHREAD_RWLOCK_INITIALIZER { { 0 } }
typedef int pthread_key_t;
diff --git a/libc/include/sys/mount.h b/libc/include/sys/mount.h
index 3c35d31..fd7cf17 100644
--- a/libc/include/sys/mount.h
+++ b/libc/include/sys/mount.h
@@ -25,6 +25,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
#ifndef _SYS_MOUNT_H
#define _SYS_MOUNT_H
@@ -35,9 +36,10 @@
__BEGIN_DECLS
/* umount2 flags. */
-#define MNT_FORCE 1 /* Forcibly unmount */
-#define MNT_DETACH 2 /* Detach from tree only */
-#define MNT_EXPIRE 4 /* Mark for expiry */
+#define MNT_FORCE 1
+#define MNT_DETACH 2
+#define MNT_EXPIRE 4
+#define UMOUNT_NOFOLLOW 8
extern int mount(const char*, const char*, const char*, unsigned long, const void*);
extern int umount(const char*);
diff --git a/libc/include/syslog.h b/libc/include/syslog.h
index cbceab2..8000f03 100644
--- a/libc/include/syslog.h
+++ b/libc/include/syslog.h
@@ -47,6 +47,7 @@
#define LOG_PRIMASK 7
#define LOG_PRI(x) ((x) & LOG_PRIMASK)
+#define LOG_MAKEPRI(fac, pri) ((fac) | (pri))
/* Facilities are currently ignored on Android. */
#define LOG_KERN 0000
diff --git a/libc/private/bionic_asm.h b/libc/private/bionic_asm.h
index d53ebba..5fca222 100644
--- a/libc/private/bionic_asm.h
+++ b/libc/private/bionic_asm.h
@@ -57,4 +57,8 @@
ENTRY(f); \
.hidden f \
+#define ALIAS_SYMBOL(alias, original) \
+ .globl alias; \
+ .equ alias, original
+
#endif /* _PRIVATE_BIONIC_ASM_H_ */
diff --git a/libm/Android.mk b/libm/Android.mk
index 15c390c..6472a15 100644
--- a/libm/Android.mk
+++ b/libm/Android.mk
@@ -21,19 +21,14 @@
upstream-freebsd/lib/msun/bsdsrc/b_tgamma.c \
upstream-freebsd/lib/msun/src/catrig.c \
upstream-freebsd/lib/msun/src/catrigf.c \
- upstream-freebsd/lib/msun/src/e_acos.c \
upstream-freebsd/lib/msun/src/e_acosf.c \
upstream-freebsd/lib/msun/src/e_acosh.c \
upstream-freebsd/lib/msun/src/e_acoshf.c \
- upstream-freebsd/lib/msun/src/e_asin.c \
upstream-freebsd/lib/msun/src/e_asinf.c \
- upstream-freebsd/lib/msun/src/e_atan2.c \
upstream-freebsd/lib/msun/src/e_atan2f.c \
upstream-freebsd/lib/msun/src/e_atanh.c \
upstream-freebsd/lib/msun/src/e_atanhf.c \
- upstream-freebsd/lib/msun/src/e_cosh.c \
upstream-freebsd/lib/msun/src/e_coshf.c \
- upstream-freebsd/lib/msun/src/e_exp.c \
upstream-freebsd/lib/msun/src/e_expf.c \
upstream-freebsd/lib/msun/src/e_fmod.c \
upstream-freebsd/lib/msun/src/e_fmodf.c \
@@ -41,7 +36,6 @@
upstream-freebsd/lib/msun/src/e_gammaf.c \
upstream-freebsd/lib/msun/src/e_gammaf_r.c \
upstream-freebsd/lib/msun/src/e_gamma_r.c \
- upstream-freebsd/lib/msun/src/e_hypot.c \
upstream-freebsd/lib/msun/src/e_hypotf.c \
upstream-freebsd/lib/msun/src/e_j0.c \
upstream-freebsd/lib/msun/src/e_j0f.c \
@@ -53,13 +47,10 @@
upstream-freebsd/lib/msun/src/e_lgammaf.c \
upstream-freebsd/lib/msun/src/e_lgammaf_r.c \
upstream-freebsd/lib/msun/src/e_lgamma_r.c \
- upstream-freebsd/lib/msun/src/e_log10.c \
upstream-freebsd/lib/msun/src/e_log10f.c \
upstream-freebsd/lib/msun/src/e_log2.c \
upstream-freebsd/lib/msun/src/e_log2f.c \
- upstream-freebsd/lib/msun/src/e_log.c \
upstream-freebsd/lib/msun/src/e_logf.c \
- upstream-freebsd/lib/msun/src/e_pow.c \
upstream-freebsd/lib/msun/src/e_powf.c \
upstream-freebsd/lib/msun/src/e_remainder.c \
upstream-freebsd/lib/msun/src/e_remainderf.c \
@@ -67,7 +58,6 @@
upstream-freebsd/lib/msun/src/e_rem_pio2f.c \
upstream-freebsd/lib/msun/src/e_scalb.c \
upstream-freebsd/lib/msun/src/e_scalbf.c \
- upstream-freebsd/lib/msun/src/e_sinh.c \
upstream-freebsd/lib/msun/src/e_sinhf.c \
upstream-freebsd/lib/msun/src/imprecise.c \
upstream-freebsd/lib/msun/src/k_cos.c \
@@ -81,12 +71,10 @@
upstream-freebsd/lib/msun/src/k_tanf.c \
upstream-freebsd/lib/msun/src/s_asinh.c \
upstream-freebsd/lib/msun/src/s_asinhf.c \
- upstream-freebsd/lib/msun/src/s_atan.c \
upstream-freebsd/lib/msun/src/s_atanf.c \
upstream-freebsd/lib/msun/src/s_carg.c \
upstream-freebsd/lib/msun/src/s_cargf.c \
upstream-freebsd/lib/msun/src/s_cargl.c \
- upstream-freebsd/lib/msun/src/s_cbrt.c \
upstream-freebsd/lib/msun/src/s_cbrtf.c \
upstream-freebsd/lib/msun/src/s_ccosh.c \
upstream-freebsd/lib/msun/src/s_ccoshf.c \
@@ -100,7 +88,6 @@
upstream-freebsd/lib/msun/src/s_conjl.c \
upstream-freebsd/lib/msun/src/s_copysign.c \
upstream-freebsd/lib/msun/src/s_copysignf.c \
- upstream-freebsd/lib/msun/src/s_cos.c \
upstream-freebsd/lib/msun/src/s_cosf.c \
upstream-freebsd/lib/msun/src/s_cproj.c \
upstream-freebsd/lib/msun/src/s_cprojf.c \
@@ -119,7 +106,6 @@
upstream-freebsd/lib/msun/src/s_erff.c \
upstream-freebsd/lib/msun/src/s_exp2.c \
upstream-freebsd/lib/msun/src/s_exp2f.c \
- upstream-freebsd/lib/msun/src/s_expm1.c \
upstream-freebsd/lib/msun/src/s_expm1f.c \
upstream-freebsd/lib/msun/src/s_fabs.c \
upstream-freebsd/lib/msun/src/s_fabsf.c \
@@ -136,7 +122,6 @@
upstream-freebsd/lib/msun/src/s_ilogbf.c \
upstream-freebsd/lib/msun/src/s_llround.c \
upstream-freebsd/lib/msun/src/s_llroundf.c \
- upstream-freebsd/lib/msun/src/s_log1p.c \
upstream-freebsd/lib/msun/src/s_log1pf.c \
upstream-freebsd/lib/msun/src/s_logb.c \
upstream-freebsd/lib/msun/src/s_logbf.c \
@@ -158,11 +143,8 @@
upstream-freebsd/lib/msun/src/s_signgam.c \
upstream-freebsd/lib/msun/src/s_significand.c \
upstream-freebsd/lib/msun/src/s_significandf.c \
- upstream-freebsd/lib/msun/src/s_sin.c \
upstream-freebsd/lib/msun/src/s_sinf.c \
- upstream-freebsd/lib/msun/src/s_tan.c \
upstream-freebsd/lib/msun/src/s_tanf.c \
- upstream-freebsd/lib/msun/src/s_tanh.c \
upstream-freebsd/lib/msun/src/s_tanhf.c \
upstream-freebsd/lib/msun/src/s_tgammaf.c \
upstream-freebsd/lib/msun/src/w_cabs.c \
@@ -252,17 +234,35 @@
# -----------------------------------------------------------------------------
LOCAL_SRC_FILES_arm += \
arm/fenv.c \
+ upstream-freebsd/lib/msun/src/e_acos.c \
+ upstream-freebsd/lib/msun/src/e_asin.c \
+ upstream-freebsd/lib/msun/src/e_atan2.c \
+ upstream-freebsd/lib/msun/src/e_cosh.c \
+ upstream-freebsd/lib/msun/src/e_exp.c \
+ upstream-freebsd/lib/msun/src/e_hypot.c \
+ upstream-freebsd/lib/msun/src/e_log.c \
+ upstream-freebsd/lib/msun/src/e_log10.c \
+ upstream-freebsd/lib/msun/src/e_pow.c \
+ upstream-freebsd/lib/msun/src/e_sinh.c \
+ upstream-freebsd/lib/msun/src/s_atan.c \
+ upstream-freebsd/lib/msun/src/s_cbrt.c \
upstream-freebsd/lib/msun/src/s_ceil.c \
upstream-freebsd/lib/msun/src/s_ceilf.c \
+ upstream-freebsd/lib/msun/src/s_cos.c \
upstream-freebsd/lib/msun/src/s_fma.c \
upstream-freebsd/lib/msun/src/s_fmaf.c \
upstream-freebsd/lib/msun/src/s_floorf.c \
+ upstream-freebsd/lib/msun/src/s_expm1.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
+ upstream-freebsd/lib/msun/src/s_log1p.c \
upstream-freebsd/lib/msun/src/s_lrint.c \
upstream-freebsd/lib/msun/src/s_lrintf.c \
upstream-freebsd/lib/msun/src/s_rint.c \
upstream-freebsd/lib/msun/src/s_rintf.c \
+ upstream-freebsd/lib/msun/src/s_sin.c \
+ upstream-freebsd/lib/msun/src/s_tan.c \
+ upstream-freebsd/lib/msun/src/s_tanh.c \
upstream-freebsd/lib/msun/src/s_trunc.c \
upstream-freebsd/lib/msun/src/s_truncf.c \
@@ -300,26 +300,62 @@
arm64/rint.S \
arm64/sqrt.S \
arm64/trunc.S \
+ upstream-freebsd/lib/msun/src/e_acos.c \
+ upstream-freebsd/lib/msun/src/e_asin.c \
+ upstream-freebsd/lib/msun/src/e_atan2.c \
+ upstream-freebsd/lib/msun/src/e_cosh.c \
+ upstream-freebsd/lib/msun/src/e_exp.c \
+ upstream-freebsd/lib/msun/src/e_hypot.c \
+ upstream-freebsd/lib/msun/src/e_log.c \
+ upstream-freebsd/lib/msun/src/e_log10.c \
+ upstream-freebsd/lib/msun/src/e_pow.c \
+ upstream-freebsd/lib/msun/src/e_sinh.c \
+ upstream-freebsd/lib/msun/src/s_atan.c \
+ upstream-freebsd/lib/msun/src/s_cbrt.c \
+ upstream-freebsd/lib/msun/src/s_cos.c \
+ upstream-freebsd/lib/msun/src/s_expm1.c \
+ upstream-freebsd/lib/msun/src/s_log1p.c \
+ upstream-freebsd/lib/msun/src/s_sin.c \
+ upstream-freebsd/lib/msun/src/s_tan.c \
+ upstream-freebsd/lib/msun/src/s_tanh.c \
# -----------------------------------------------------------------------------
# mips
# -----------------------------------------------------------------------------
libm_mips_arch_files := \
mips/fenv.c \
+ upstream-freebsd/lib/msun/src/e_acos.c \
+ upstream-freebsd/lib/msun/src/e_asin.c \
+ upstream-freebsd/lib/msun/src/e_atan2.c \
+ upstream-freebsd/lib/msun/src/e_cosh.c \
+ upstream-freebsd/lib/msun/src/e_exp.c \
+ upstream-freebsd/lib/msun/src/e_hypot.c \
+ upstream-freebsd/lib/msun/src/e_log.c \
+ upstream-freebsd/lib/msun/src/e_log10.c \
+ upstream-freebsd/lib/msun/src/e_pow.c \
+ upstream-freebsd/lib/msun/src/e_sinh.c \
upstream-freebsd/lib/msun/src/e_sqrt.c \
upstream-freebsd/lib/msun/src/e_sqrtf.c \
+ upstream-freebsd/lib/msun/src/s_atan.c \
+ upstream-freebsd/lib/msun/src/s_cbrt.c \
upstream-freebsd/lib/msun/src/s_ceil.c \
upstream-freebsd/lib/msun/src/s_ceilf.c \
+ upstream-freebsd/lib/msun/src/s_cos.c \
upstream-freebsd/lib/msun/src/s_fma.c \
upstream-freebsd/lib/msun/src/s_fmaf.c \
upstream-freebsd/lib/msun/src/s_floor.c \
upstream-freebsd/lib/msun/src/s_floorf.c \
+ upstream-freebsd/lib/msun/src/s_expm1.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
+ upstream-freebsd/lib/msun/src/s_log1p.c \
upstream-freebsd/lib/msun/src/s_lrint.c \
upstream-freebsd/lib/msun/src/s_lrintf.c \
upstream-freebsd/lib/msun/src/s_rint.c \
upstream-freebsd/lib/msun/src/s_rintf.c \
+ upstream-freebsd/lib/msun/src/s_sin.c \
+ upstream-freebsd/lib/msun/src/s_tan.c \
+ upstream-freebsd/lib/msun/src/s_tanh.c \
upstream-freebsd/lib/msun/src/s_trunc.c \
upstream-freebsd/lib/msun/src/s_truncf.c \
@@ -331,45 +367,112 @@
# -----------------------------------------------------------------------------
LOCAL_SRC_FILES_x86 += \
i387/fenv.c \
- upstream-freebsd/lib/msun/src/e_sqrt.c \
- upstream-freebsd/lib/msun/src/e_sqrtf.c \
- upstream-freebsd/lib/msun/src/s_ceil.c \
- upstream-freebsd/lib/msun/src/s_ceilf.c \
upstream-freebsd/lib/msun/src/s_fma.c \
upstream-freebsd/lib/msun/src/s_fmaf.c \
- upstream-freebsd/lib/msun/src/s_floor.c \
- upstream-freebsd/lib/msun/src/s_floorf.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
upstream-freebsd/lib/msun/src/s_lrint.c \
upstream-freebsd/lib/msun/src/s_lrintf.c \
upstream-freebsd/lib/msun/src/s_rint.c \
upstream-freebsd/lib/msun/src/s_rintf.c \
+ x86/sqrt.S \
+ x86/sqrtf.S \
+ x86/e_acos.S \
+ x86/e_asin.S \
+ x86/e_atan2.S \
+ x86/e_cosh.S \
+ x86/e_exp.S \
+ x86/e_hypot.S \
+ x86/e_log10.S \
+ x86/e_log.S \
+ x86/e_pow.S \
+ x86/e_sinh.S \
+ x86/libm_reduce_pi04l.S \
+ x86/libm_sincos_huge.S \
+ x86/libm_tancot_huge.S \
+ x86/s_atan.S \
+ x86/s_cbrt.S \
+ x86/s_cos.S \
+ x86/s_expm1.S \
+ x86/s_log1p.S \
+ x86/s_sin.S \
+ x86/s_tanh.S \
+ x86/s_tan.S \
+
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_SRC_FILES_x86 += \
+ x86/ceil.S \
+ x86/ceilf.S \
+ x86/floor.S \
+ x86/floorf.S \
+ x86/trunc.S \
+ x86/truncf.S \
+
+else
+LOCAL_SRC_FILES_x86 += \
+ upstream-freebsd/lib/msun/src/s_ceil.c \
+ upstream-freebsd/lib/msun/src/s_ceilf.c \
+ upstream-freebsd/lib/msun/src/s_floor.c \
+ upstream-freebsd/lib/msun/src/s_floorf.c \
upstream-freebsd/lib/msun/src/s_trunc.c \
upstream-freebsd/lib/msun/src/s_truncf.c \
+endif
+
# -----------------------------------------------------------------------------
# x86_64
# -----------------------------------------------------------------------------
LOCAL_SRC_FILES_x86_64 += \
amd64/fenv.c \
- upstream-freebsd/lib/msun/src/e_sqrt.c \
- upstream-freebsd/lib/msun/src/e_sqrtf.c \
- upstream-freebsd/lib/msun/src/s_ceil.c \
- upstream-freebsd/lib/msun/src/s_ceilf.c \
upstream-freebsd/lib/msun/src/s_fma.c \
upstream-freebsd/lib/msun/src/s_fmaf.c \
- upstream-freebsd/lib/msun/src/s_floor.c \
- upstream-freebsd/lib/msun/src/s_floorf.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
upstream-freebsd/lib/msun/src/s_lrint.c \
upstream-freebsd/lib/msun/src/s_lrintf.c \
upstream-freebsd/lib/msun/src/s_rint.c \
upstream-freebsd/lib/msun/src/s_rintf.c \
+ x86_64/sqrt.S \
+ x86_64/sqrtf.S \
+ x86_64/e_acos.S \
+ x86_64/e_asin.S \
+ x86_64/e_atan2.S \
+ x86_64/e_cosh.S \
+ x86_64/e_exp.S \
+ x86_64/e_hypot.S \
+ x86_64/e_log10.S \
+ x86_64/e_log.S \
+ x86_64/e_pow.S \
+ x86_64/e_sinh.S \
+ x86_64/s_atan.S \
+ x86_64/s_cbrt.S \
+ x86_64/s_cos.S \
+ x86_64/s_expm1.S \
+ x86_64/s_log1p.S \
+ x86_64/s_sin.S \
+ x86_64/s_tanh.S \
+ x86_64/s_tan.S \
+
+ifeq ($(ARCH_X86_HAVE_SSE4_1),true)
+LOCAL_SRC_FILES_x86_64 += \
+ x86_64/ceil.S \
+ x86_64/ceilf.S \
+ x86_64/floor.S \
+ x86_64/floorf.S \
+ x86_64/trunc.S \
+ x86_64/truncf.S \
+
+else
+LOCAL_SRC_FILES_x86_64 += \
+ upstream-freebsd/lib/msun/src/s_ceil.c \
+ upstream-freebsd/lib/msun/src/s_ceilf.c \
+ upstream-freebsd/lib/msun/src/s_floor.c \
+ upstream-freebsd/lib/msun/src/s_floorf.c \
upstream-freebsd/lib/msun/src/s_trunc.c \
upstream-freebsd/lib/msun/src/s_truncf.c \
+endif
+
LOCAL_C_INCLUDES_x86 += $(LOCAL_PATH)/i387
LOCAL_C_INCLUDES += $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
@@ -410,6 +513,9 @@
# -----------------------------------------------------------------------------
include $(CLEAR_VARS)
+# TODO: This is to work around b/19059885. Remove after root cause is fixed
+LOCAL_LDFLAGS_arm := -Wl,--hash-style=sysv
+
LOCAL_MODULE := libm
LOCAL_CLANG := $(libm_clang)
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
diff --git a/libm/arm/e_sqrt.S b/libm/arm/e_sqrt.S
index 669212f..17312f5 100644
--- a/libm/arm/e_sqrt.S
+++ b/libm/arm/e_sqrt.S
@@ -39,7 +39,4 @@
bx lr
END(sqrt)
-#if LDBL_MANT_DIG == 53
- .weak sqrtl
- .equ sqrtl, sqrt
-#endif
+ALIAS_SYMBOL(sqrtl, sqrt);
diff --git a/libm/arm/s_floor.S b/libm/arm/s_floor.S
index 4405358..3af8f76 100644
--- a/libm/arm/s_floor.S
+++ b/libm/arm/s_floor.S
@@ -136,7 +136,4 @@
END(floor)
-#if LDBL_MANT_DIG == 53
- .weak floorl
- .equ floorl,floor
-#endif
+ALIAS_SYMBOL(floorl, floor);
diff --git a/libm/arm64/lrint.S b/libm/arm64/lrint.S
index 69cc10c..d642759 100644
--- a/libm/arm64/lrint.S
+++ b/libm/arm64/lrint.S
@@ -29,8 +29,6 @@
END(lrintf)
// sizeof(long) and sizeof(long long) are the same for aarch64
-.weak llrint
-.equ llrint,lrint
+ALIAS_SYMBOL(llrint, lrint);
-.weak llrintf
-.equ llrintf,lrintf
+ALIAS_SYMBOL(llrintf, lrintf);
diff --git a/libm/x86/ceil.S b/libm/x86/ceil.S
new file mode 100644
index 0000000..6302037
--- /dev/null
+++ b/libm/x86/ceil.S
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(ceil)
+ mov %esp,%eax
+ and $0xfffffff8,%eax
+ movsd 0x4(%esp),%xmm0
+ roundsd $0x2,%xmm0,%xmm0
+ movlpd %xmm0,-0x8(%eax)
+ fldl -0x8(%eax)
+ ret
+END(ceil)
+
+ALIAS_SYMBOL(ceill, ceil);
diff --git a/libm/x86/ceilf.S b/libm/x86/ceilf.S
new file mode 100644
index 0000000..51eb440
--- /dev/null
+++ b/libm/x86/ceilf.S
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(ceilf)
+ movss 0x4(%esp),%xmm0
+ roundss $0x2,%xmm0,%xmm0
+ movss %xmm0,-0x4(%esp)
+ flds -0x4(%esp)
+ ret
+END(ceilf)
diff --git a/libm/x86/e_acos.S b/libm/x86/e_acos.S
new file mode 100644
index 0000000..fa61853
--- /dev/null
+++ b/libm/x86/e_acos.S
@@ -0,0 +1,1929 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// To compute acos(s), separate schemes are used when s is in different
+// intervals.
+//
+// |s| in [2^{-4}, sqrt(3)/2):
+// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52
+// acos(s)=pi/2-asin(t)-asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2)
+// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7)
+// For the first degree term, r is evaluated as
+// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t)
+// (sqrt(1-t^2) read from table)
+// The main source of error is still R (may still be affected by up to 3 ulps
+// of rounding error). The table size must be sufficiently large, to minimize
+// this effect.
+//
+// |s| in [sqrt(3)/2, 255/256):
+// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded)
+// acos(|s|)=asin(t)-asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2)
+// acos(-|s|)=pi-acos(|s|)
+// (The -PI constant, or 0, is added to the result. The sign is set at
+// the end)
+// asin(r) evaluated as a polynomial (same as above)
+// The first degree term is evaluated as
+// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2))
+//
+// |s|<2^{-4}: acos(s)=pi/2-asin(s)
+// evaluate asin(s) as 13-degree polynomial
+//
+// |s| in [255/256,1): acos(|s|)=2*asin(q), where q=sqrt((1-|s|)/2)
+// asin(q) is evaluated as 13-degree polynomial
+// q^2=(1-|s|)/2 is obtained in advance
+// 2*q*eps ~ ((1-|s|)/2-q^2)/q used for first term
+// acos(-|s|)=pi-acos(|s|)
+// (The -PI constant, or 0, is added to the result. The sign is set at
+// the end)
+//
+// Special cases:
+// acos(NaN) = quiet NaN, and raise invalid exception
+// acos(INF) = QNaN and raise invalid exception
+// acos(x) = QNaN and raise invalid exception, for |x|>1.0
+// acos(1) = +0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin acos
+ENTRY(acos)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 48(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ movsd 6048(%ebx), %xmm4
+ movsd 6080(%ebx), %xmm3
+ xorpd %xmm5, %xmm5
+ movsd 6064(%ebx), %xmm2
+ movapd %xmm0, %xmm1
+ movsd %xmm0, 8(%esp)
+ psrlq $44, %xmm0
+ movd %xmm0, %edx
+ movapd %xmm1, %xmm7
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movapd %xmm1, %xmm0
+ movl $524287, %eax
+ andl %edx, %eax
+ subl $260864, %eax
+ cmpl $955, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ mulsd %xmm1, %xmm1
+ andl $65535, %edx
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andpd %xmm7, %xmm2
+ andl $-4, %edx
+ subl $64256, %edx
+ movsd 3840(%ebx,%edx,2), %xmm1
+ orpd %xmm5, %xmm2
+ movapd (%ebx,%edx,4), %xmm4
+ movapd %xmm7, %xmm6
+ addsd %xmm2, %xmm7
+ subsd %xmm2, %xmm0
+ mulsd %xmm0, %xmm7
+ mulsd %xmm1, %xmm6
+ mulsd %xmm2, %xmm3
+ movapd %xmm6, %xmm1
+ addsd %xmm3, %xmm6
+ divsd %xmm6, %xmm7
+ movsd 5976(%ebx), %xmm0
+ movsd 5960(%ebx), %xmm5
+ subsd %xmm3, %xmm1
+ psrlq $63, %xmm2
+ movapd %xmm1, %xmm3
+ psllq $63, %xmm2
+ mulsd %xmm1, %xmm1
+ pshufd $68, %xmm2, %xmm2
+ movsd 5968(%ebx), %xmm6
+ mulsd %xmm1, %xmm3
+ mulsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm4
+ mulsd %xmm3, %xmm5
+ subpd 5888(%ebx), %xmm4
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulsd %xmm3, %xmm0
+ subsd %xmm4, %xmm5
+ pshufd $238, %xmm4, %xmm4
+ addsd %xmm5, %xmm0
+ subsd %xmm7, %xmm0
+ subsd %xmm4, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ subl $955, %eax
+ cmpl $65, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ psrlq $38, %xmm7
+ psllq $38, %xmm7
+ pmovmskb %xmm0, %eax
+ andnpd %xmm0, %xmm4
+ subsd %xmm7, %xmm1
+ movapd %xmm7, %xmm6
+ mulsd %xmm7, %xmm7
+ addsd %xmm6, %xmm0
+ orpd %xmm4, %xmm5
+ subsd %xmm7, %xmm3
+ mulsd %xmm1, %xmm0
+ movapd %xmm3, %xmm4
+ subsd %xmm0, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andl $128, %eax
+ shrl $7, %eax
+ negl %eax
+ movapd %xmm3, %xmm7
+ andpd %xmm3, %xmm2
+ psllq $2, %xmm3
+ pextrw $3, %xmm3, %edx
+ orpd %xmm5, %xmm2
+ movd %eax, %xmm3
+ pshufd $0, %xmm3, %xmm3
+ subl $65216, %edx
+ addl %edx, %edx
+ mulsd 3840(%ebx,%edx,4), %xmm7
+ mulsd %xmm2, %xmm6
+ mulsd %xmm2, %xmm1
+ mulsd %xmm2, %xmm2
+ subsd %xmm7, %xmm6
+ andpd 5904(%ebx), %xmm3
+ addsd %xmm1, %xmm6
+ subsd %xmm2, %xmm4
+ addsd %xmm7, %xmm7
+ movsd 5960(%ebx), %xmm5
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm7
+ movsd 5976(%ebx), %xmm0
+ divsd %xmm7, %xmm4
+ movsd 5968(%ebx), %xmm2
+ addpd (%ebx,%edx,8), %xmm3
+ movapd %xmm6, %xmm1
+ mulsd %xmm6, %xmm6
+ mulsd %xmm6, %xmm0
+ mulsd %xmm6, %xmm1
+ mulsd %xmm1, %xmm5
+ mulsd %xmm6, %xmm1
+ addsd %xmm2, %xmm0
+ pxor %xmm6, %xmm6
+ mulsd %xmm1, %xmm0
+ addsd %xmm3, %xmm5
+ addsd %xmm5, %xmm0
+ andl $32768, %eax
+ pinsrw $3, %eax, %xmm6
+ movapd %xmm4, %xmm5
+ pshufd $238, %xmm3, %xmm3
+ addsd %xmm3, %xmm4
+ subsd %xmm4, %xmm3
+ addsd %xmm3, %xmm5
+ addsd %xmm5, %xmm0
+ addsd %xmm4, %xmm0
+ xorpd %xmm6, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ addl $15291, %eax
+ cmpl $14336, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ unpcklpd %xmm0, %xmm0
+ movapd 5984(%ebx), %xmm6
+ unpcklpd %xmm0, %xmm1
+ movapd 6000(%ebx), %xmm2
+ movapd 6016(%ebx), %xmm4
+ mulpd %xmm0, %xmm0
+ movapd 5888(%ebx), %xmm5
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm6
+ mulpd %xmm0, %xmm0
+ movapd %xmm1, %xmm3
+ mulsd %xmm1, %xmm1
+ addpd %xmm2, %xmm6
+ mulpd %xmm0, %xmm4
+ mulsd %xmm3, %xmm1
+ addpd %xmm4, %xmm6
+ pshufd $238, %xmm5, %xmm0
+ mulpd %xmm6, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ subsd %xmm7, %xmm0
+ pshufd $238, %xmm1, %xmm2
+ subsd %xmm1, %xmm5
+ subsd %xmm0, %xmm6
+ subsd %xmm2, %xmm5
+ subsd %xmm6, %xmm7
+ subsd %xmm7, %xmm5
+ addsd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_3.0.2:
+ subl $15356, %eax
+ cmpl $4, %eax
+ jae .L_2TAG_PACKET_4.0.2
+ xorpd %xmm6, %xmm6
+ andpd 6048(%ebx), %xmm7
+ movsd 6096(%ebx), %xmm4
+ movapd 5984(%ebx), %xmm1
+ mulsd %xmm4, %xmm7
+ movapd 6000(%ebx), %xmm2
+ subsd %xmm7, %xmm4
+ movapd 6016(%ebx), %xmm3
+ pshufd $68, %xmm4, %xmm7
+ sqrtsd %xmm4, %xmm4
+ mulpd %xmm7, %xmm1
+ pshufd $68, %xmm7, %xmm5
+ pextrw $3, %xmm0, %eax
+ mulpd %xmm7, %xmm7
+ addpd %xmm1, %xmm2
+ movsd 5936(%ebx), %xmm1
+ mulpd %xmm7, %xmm3
+ cmpsd $1, %xmm6, %xmm0
+ mulsd %xmm5, %xmm7
+ addpd %xmm3, %xmm2
+ pshufd $68, %xmm0, %xmm0
+ mulsd %xmm7, %xmm2
+ andpd 5904(%ebx), %xmm0
+ mulpd %xmm5, %xmm2
+ andpd %xmm4, %xmm1
+ pshufd $68, %xmm4, %xmm3
+ subsd %xmm1, %xmm4
+ addsd %xmm3, %xmm3
+ mulsd %xmm1, %xmm1
+ subsd %xmm4, %xmm3
+ subsd %xmm1, %xmm5
+ mulsd %xmm3, %xmm4
+ pshufd $238, %xmm3, %xmm3
+ subsd %xmm4, %xmm5
+ divsd %xmm3, %xmm5
+ addpd %xmm3, %xmm3
+ mulpd %xmm3, %xmm2
+ pshufd $238, %xmm2, %xmm4
+ addsd %xmm0, %xmm2
+ andl $32768, %eax
+ pinsrw $3, %eax, %xmm6
+ pshufd $238, %xmm0, %xmm0
+ addsd %xmm4, %xmm2
+ addsd %xmm5, %xmm2
+ addsd %xmm3, %xmm2
+ addsd %xmm2, %xmm0
+ xorpd %xmm6, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_4.0.2:
+ addl $261884, %eax
+ cmpl $261888, %eax
+ jb .L_2TAG_PACKET_5.0.2
+ movd %xmm7, %ecx
+ psrlq $32, %xmm7
+ movd %xmm7, %edx
+ andl $2147483647, %edx
+ movl $1072693248, %eax
+ subl %edx, %eax
+ orl %ecx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_6.0.2
+ movq 8(%esp), %xmm2
+ movd %xmm2, %edx
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $2147483647, %ecx
+ subl $1, %edx
+ sbbl $2146435072, %ecx
+ cmpl $0, %ecx
+ jge .L_2TAG_PACKET_7.0.2
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_6.0.2:
+ pextrw $1, %xmm7, %edx
+ shrl $15, %edx
+ negl %edx
+ movd %edx, %xmm7
+ pshufd $0, %xmm7, %xmm7
+ movsd 5920(%ebx), %xmm2
+ movsd 5928(%ebx), %xmm0
+ andpd %xmm7, %xmm2
+ andpd %xmm7, %xmm0
+ addsd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_5.0.2:
+ movsd 5888(%ebx), %xmm2
+ movsd 5896(%ebx), %xmm0
+ addsd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm6, %xmm6
+ addsd %xmm6, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+.L_2TAG_PACKET_1.0.2:
+ movl 48(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(acos)
+# -- End acos
+
+# Start file scope ASM
+ALIAS_SYMBOL(acosl, acos);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 3822952792
+ .long 1021639372
+ .long 182792448
+ .long 1068507836
+ .long 2264213271
+ .long 1019558908
+ .long 649052928
+ .long 1068524253
+ .long 1797139609
+ .long 1022295143
+ .long 1243095296
+ .long 1068540671
+ .long 1415938756
+ .long 1021439537
+ .long 2033294592
+ .long 1068557090
+ .long 2356809978
+ .long 1021777916
+ .long 3088063744
+ .long 1068573510
+ .long 2669055318
+ .long 1022124482
+ .long 180888576
+ .long 1068589932
+ .long 3566445325
+ .long 1021358712
+ .long 1970196992
+ .long 1068606354
+ .long 896980323
+ .long 1021319659
+ .long 4229555456
+ .long 1068622777
+ .long 436049712
+ .long 1021319758
+ .long 2732572160
+ .long 1068639202
+ .long 583123209
+ .long 1020797960
+ .long 1842831872
+ .long 1068655628
+ .long 1370449804
+ .long 1021429270
+ .long 1628994560
+ .long 1068672055
+ .long 2411391464
+ .long 1021057980
+ .long 2159763712
+ .long 1068688483
+ .long 1208692749
+ .long 1021943903
+ .long 3503886336
+ .long 1068704912
+ .long 538793309
+ .long 1019744063
+ .long 1435187200
+ .long 1068721343
+ .long 4085087612
+ .long 1020608419
+ .long 317469952
+ .long 1068737775
+ .long 144386942
+ .long 1021440732
+ .long 219617280
+ .long 1068754208
+ .long 2940088361
+ .long 1019981122
+ .long 1210558208
+ .long 1068770642
+ .long 2176850347
+ .long 1018373705
+ .long 3359268352
+ .long 1068787077
+ .long 2395611454
+ .long 1021889042
+ .long 2439803648
+ .long 1068803514
+ .long 1650705253
+ .long 1020227966
+ .long 2816203520
+ .long 1068819952
+ .long 3702166386
+ .long 1019379914
+ .long 262620672
+ .long 1068836392
+ .long 1855649370
+ .long 1020453124
+ .long 3438159616
+ .long 1068852832
+ .long 923063860
+ .long 1019273834
+ .long 3822105856
+ .long 1068869274
+ .long 4289947947
+ .long 1019434249
+ .long 1483729920
+ .long 1068885718
+ .long 787455814
+ .long 1020738379
+ .long 787321088
+ .long 1068902163
+ .long 3321653337
+ .long 1021842569
+ .long 1802253312
+ .long 1068918609
+ .long 2653633526
+ .long 1021821525
+ .long 302985984
+ .long 1068935057
+ .long 161272028
+ .long 1021655149
+ .long 653966080
+ .long 1068951506
+ .long 2566098667
+ .long 1020066219
+ .long 2924727296
+ .long 1068967956
+ .long 3646493722
+ .long 1014292285
+ .long 2889890304
+ .long 1068984408
+ .long 1081009196
+ .long 1022189620
+ .long 619098112
+ .long 1069000862
+ .long 4011643355
+ .long 1021773297
+ .long 477017600
+ .long 1069017317
+ .long 4030305534
+ .long 1021292252
+ .long 2533403904
+ .long 1069033773
+ .long 2645187591
+ .long 1019527099
+ .long 2563102208
+ .long 1069050231
+ .long 3857293792
+ .long 1022311697
+ .long 635982336
+ .long 1069066691
+ .long 3625936637
+ .long 1017511744
+ .long 1116940800
+ .long 1069083152
+ .long 3653872993
+ .long 1022016631
+ .long 4075964160
+ .long 1069099614
+ .long 2468900271
+ .long 1021769532
+ .long 993165568
+ .long 1069116079
+ .long 1358104224
+ .long 1021199776
+ .long 528586752
+ .long 1069132545
+ .long 2200950332
+ .long 1022024872
+ .long 2752395776
+ .long 1069149012
+ .long 3197072454
+ .long 1017751319
+ .long 3439855616
+ .long 1069165481
+ .long 1651081806
+ .long 1020809338
+ .long 2661257728
+ .long 1069181952
+ .long 539032752
+ .long 1021728805
+ .long 486957312
+ .long 1069198425
+ .long 3136045149
+ .long 1016888671
+ .long 1282340352
+ .long 1069214899
+ .long 2593963259
+ .long 1018956103
+ .long 822921728
+ .long 1069231375
+ .long 2146032737
+ .long 1022306465
+ .long 3474216192
+ .long 1069247852
+ .long 3976811625
+ .long 1021350207
+ .long 716902656
+ .long 1069264332
+ .long 718267222
+ .long 1018624727
+ .long 1211594496
+ .long 1069280813
+ .long 1485641389
+ .long 1018447451
+ .long 734070272
+ .long 1069297296
+ .long 354455128
+ .long 1021341291
+ .long 3650110720
+ .long 1069313780
+ .long 682185947
+ .long 1021651853
+ .long 1440663040
+ .long 1069330267
+ .long 3558574550
+ .long 1021615110
+ .long 2766612224
+ .long 1069346755
+ .long 874607978
+ .long 1017746872
+ .long 3404011008
+ .long 1069363245
+ .long 4154988502
+ .long 1021439906
+ .long 3423949056
+ .long 1069379737
+ .long 2263202309
+ .long 1021479615
+ .long 2897587712
+ .long 1069396231
+ .long 2562065031
+ .long 1022090363
+ .long 1896159232
+ .long 1069412727
+ .long 3836237663
+ .long 1019867288
+ .long 490968576
+ .long 1069429225
+ .long 3322056743
+ .long 1006752762
+ .long 3048360192
+ .long 1069445724
+ .long 1152314833
+ .long 1013122252
+ .long 1049850624
+ .long 1069462226
+ .long 3601590727
+ .long 1022214610
+ .long 3156899584
+ .long 1069478729
+ .long 1855169970
+ .long 1019487271
+ .long 851173376
+ .long 1069495235
+ .long 312649594
+ .long 1020868604
+ .long 2794281728
+ .long 1069511742
+ .long 1093490181
+ .long 1020777577
+ .long 468042496
+ .long 1069528252
+ .long 1152540679
+ .long 1021403732
+ .long 2534219264
+ .long 1069544763
+ .long 2292126035
+ .long 1021872430
+ .long 1376146432
+ .long 1069558527
+ .long 3293753641
+ .long 1020500454
+ .long 4175442432
+ .long 1069575044
+ .long 3626347564
+ .long 1021610969
+ .long 3523113472
+ .long 1069591566
+ .long 339956500
+ .long 1021119039
+ .long 4003350528
+ .long 1069608092
+ .long 3429333082
+ .long 1022813542
+ .long 1611067392
+ .long 1069624623
+ .long 2298017544
+ .long 1021977587
+ .long 931782144
+ .long 1069641158
+ .long 2164684743
+ .long 1021250988
+ .long 2256725504
+ .long 1069657697
+ .long 1138762335
+ .long 1021443776
+ .long 1582853120
+ .long 1069674241
+ .long 1084010382
+ .long 1022994693
+ .long 3497758720
+ .long 1069690789
+ .long 406366244
+ .long 1022713586
+ .long 3999816960
+ .long 1069707342
+ .long 1488723042
+ .long 1023381290
+ .long 3383096064
+ .long 1069723900
+ .long 2541558953
+ .long 1019137887
+ .long 1942403584
+ .long 1069740463
+ .long 1879620343
+ .long 1022653642
+ .long 4268263680
+ .long 1069757030
+ .long 3039077047
+ .long 1022252545
+ .long 2067062272
+ .long 1069773603
+ .long 4190670677
+ .long 1020725863
+ .long 4225828096
+ .long 1069790180
+ .long 1998567321
+ .long 1022014385
+ .long 2452507136
+ .long 1069806763
+ .long 1511628873
+ .long 1021900300
+ .long 1340746240
+ .long 1069823351
+ .long 788367341
+ .long 1022726208
+ .long 1190035456
+ .long 1069839944
+ .long 3856337230
+ .long 1021834118
+ .long 2300688384
+ .long 1069856542
+ .long 3211396579
+ .long 1022621365
+ .long 678886400
+ .long 1069873146
+ .long 4001011887
+ .long 1022042646
+ .long 921594112
+ .long 1069889755
+ .long 557811968
+ .long 1023065533
+ .long 3331668992
+ .long 1069906369
+ .long 1877060679
+ .long 1022419742
+ .long 3917875200
+ .long 1069922989
+ .long 1181055171
+ .long 1022752712
+ .long 2984829696
+ .long 1069939615
+ .long 4294526932
+ .long 1021499988
+ .long 838049024
+ .long 1069956247
+ .long 3658081878
+ .long 1022957952
+ .long 2078928384
+ .long 1069972884
+ .long 820353701
+ .long 1019391107
+ .long 2719854336
+ .long 1069989527
+ .long 1644022489
+ .long 1023378240
+ .long 3069117696
+ .long 1070006176
+ .long 2771393702
+ .long 1019319954
+ .long 3435962368
+ .long 1070022831
+ .long 3876394145
+ .long 1023024433
+ .long 4130595328
+ .long 1070039492
+ .long 1630447748
+ .long 1021465882
+ .long 1169236224
+ .long 1070056160
+ .long 2828355997
+ .long 1020458120
+ .long 3453997312
+ .long 1070072833
+ .long 164091641
+ .long 1020388279
+ .long 2708127744
+ .long 1070089513
+ .long 3036550223
+ .long 1023328684
+ .long 3540797696
+ .long 1070106199
+ .long 3710949463
+ .long 1022568805
+ .long 1972276736
+ .long 1070122892
+ .long 3885277950
+ .long 1019761674
+ .long 2613815552
+ .long 1070139591
+ .long 2764165077
+ .long 1022921023
+ .long 1487791616
+ .long 1070156297
+ .long 1330644769
+ .long 1023162679
+ .long 3207593472
+ .long 1070173009
+ .long 3911007221
+ .long 1022993496
+ .long 3797764608
+ .long 1070189728
+ .long 979712598
+ .long 1022554580
+ .long 3578920448
+ .long 1070206454
+ .long 2825738223
+ .long 1020223708
+ .long 2872795648
+ .long 1070223187
+ .long 392451124
+ .long 1022666279
+ .long 2002258432
+ .long 1070239927
+ .long 3730407632
+ .long 1023148291
+ .long 1291326464
+ .long 1070256674
+ .long 3723802980
+ .long 1022514089
+ .long 1065180928
+ .long 1070273428
+ .long 2635617463
+ .long 1022654470
+ .long 1650181632
+ .long 1070290189
+ .long 2061982883
+ .long 1022853411
+ .long 3373882880
+ .long 1070306957
+ .long 319732785
+ .long 1022017175
+ .long 2270081280
+ .long 1070323733
+ .long 2237757411
+ .long 1023064087
+ .long 2963732736
+ .long 1070340516
+ .long 468839165
+ .long 1023293774
+ .long 1491099904
+ .long 1070357307
+ .long 1502657946
+ .long 1021533479
+ .long 2479636480
+ .long 1070374105
+ .long 482913562
+ .long 1021986286
+ .long 1968133632
+ .long 1070390911
+ .long 3281474337
+ .long 1022646400
+ .long 291639040
+ .long 1070407725
+ .long 2453320259
+ .long 1022812423
+ .long 2081472512
+ .long 1070424546
+ .long 2939989570
+ .long 1023091888
+ .long 3380340480
+ .long 1070441375
+ .long 2850707499
+ .long 1021921109
+ .long 232287488
+ .long 1070458213
+ .long 3674625342
+ .long 1020725130
+ .long 1567614208
+ .long 1070475058
+ .long 9347334
+ .long 1022024009
+ .long 3433091072
+ .long 1070491911
+ .long 282524999
+ .long 1021433523
+ .long 1876877312
+ .long 1070508773
+ .long 3470449440
+ .long 1019309721
+ .long 1538472192
+ .long 1070525643
+ .long 2089486825
+ .long 1019698916
+ .long 2763830784
+ .long 1070542521
+ .long 443498115
+ .long 1020505194
+ .long 1605381632
+ .long 1070559408
+ .long 3018871601
+ .long 1022869913
+ .long 2706946048
+ .long 1070576303
+ .long 3936260892
+ .long 1023175875
+ .long 2123887360
+ .long 1070593207
+ .long 2994220655
+ .long 1022825948
+ .long 104015104
+ .long 1070603108
+ .long 335054493
+ .long 1023441853
+ .long 2904568832
+ .long 1070615800
+ .long 1451215633
+ .long 1023853857
+ .long 3456197120
+ .long 1070632739
+ .long 436334733
+ .long 1024026432
+ .long 252452352
+ .long 1070649697
+ .long 34596167
+ .long 1024031396
+ .long 3328018432
+ .long 1070666672
+ .long 2644547073
+ .long 1024296758
+ .long 1255829248
+ .long 1070683667
+ .long 552832586
+ .long 1023763122
+ .long 4097058560
+ .long 1070700680
+ .long 1955640623
+ .long 1021394654
+ .long 451770112
+ .long 1070717714
+ .long 3428903777
+ .long 1022941142
+ .long 408920832
+ .long 1070734767
+ .long 165503263
+ .long 1023894958
+ .long 1186960640
+ .long 1070751840
+ .long 435826450
+ .long 1024026134
+ .long 19078656
+ .long 1070768934
+ .long 1834169749
+ .long 1022899284
+ .long 2743490304
+ .long 1070786048
+ .long 494581074
+ .long 1018818479
+ .long 2328961024
+ .long 1070803184
+ .long 2987908834
+ .long 1022581110
+ .long 350011392
+ .long 1070820342
+ .long 240771184
+ .long 1024143083
+ .long 2692326912
+ .long 1070837521
+ .long 666056837
+ .long 1022394776
+ .long 2373274368
+ .long 1070854723
+ .long 2484337770
+ .long 1024228156
+ .long 1017131520
+ .long 1070871948
+ .long 3285648279
+ .long 1024025789
+ .long 265558272
+ .long 1070889196
+ .long 392241896
+ .long 1024252809
+ .long 1778008064
+ .long 1070906467
+ .long 1536107943
+ .long 1023949300
+ .long 2937184768
+ .long 1070923762
+ .long 3541062251
+ .long 1019448646
+ .long 1144442880
+ .long 1070941082
+ .long 3691683781
+ .long 1022123948
+ .long 2410165504
+ .long 1070958426
+ .long 1804181960
+ .long 1023945221
+ .long 4174350848
+ .long 1070975795
+ .long 2016094861
+ .long 1021716585
+ .long 3897012480
+ .long 1070993190
+ .long 175294410
+ .long 1023703404
+ .long 3353623040
+ .long 1071010611
+ .long 167973242
+ .long 1023240839
+ .long 45671168
+ .long 1071028059
+ .long 2166856113
+ .long 1021565413
+ .long 86063872
+ .long 1071045533
+ .long 2676254727
+ .long 1023985299
+ .long 1019772672
+ .long 1071063034
+ .long 989043593
+ .long 1021549587
+ .long 414297344
+ .long 1071080563
+ .long 3960972046
+ .long 1024307251
+ .long 155173120
+ .long 1071098120
+ .long 1830919291
+ .long 1021592251
+ .long 2151562240
+ .long 1071115705
+ .long 405408666
+ .long 1023423128
+ .long 4041854720
+ .long 1071133319
+ .long 2043497827
+ .long 1024411503
+ .long 3489224192
+ .long 1071150963
+ .long 3072215864
+ .long 1022698635
+ .long 2477196288
+ .long 1071168637
+ .long 1812195139
+ .long 1022689192
+ .long 3015298816
+ .long 1071186341
+ .long 764841969
+ .long 1021027331
+ .long 2844731136
+ .long 1071204076
+ .long 2878117321
+ .long 1019116513
+ .long 4028950528
+ .long 1071221842
+ .long 698911452
+ .long 1023265602
+ .long 69441536
+ .long 1071239641
+ .long 3253467847
+ .long 1020795075
+ .long 1676209920
+ .long 1071257471
+ .long 4272431167
+ .long 1022873982
+ .long 2408752384
+ .long 1071275334
+ .long 648519100
+ .long 1024385717
+ .long 151623680
+ .long 1071293231
+ .long 345257017
+ .long 1019561408
+ .long 1410154240
+ .long 1071311161
+ .long 197863993
+ .long 1023224207
+ .long 4131351552
+ .long 1071329125
+ .long 2620801789
+ .long 1024411169
+ .long 1999664384
+ .long 1071347125
+ .long 3952692616
+ .long 1024168086
+ .long 1617668864
+ .long 1071365160
+ .long 3019889809
+ .long 1021907692
+ .long 1032074240
+ .long 1071383231
+ .long 59469899
+ .long 1023656194
+ .long 2619492096
+ .long 1071401338
+ .long 1417526820
+ .long 1021457783
+ .long 202429440
+ .long 1071419483
+ .long 2927667935
+ .long 1019175447
+ .long 525044224
+ .long 1071437665
+ .long 38166811
+ .long 1023981879
+ .long 1779258880
+ .long 1071455885
+ .long 481252500
+ .long 1023310234
+ .long 2195673600
+ .long 1071474144
+ .long 3962395981
+ .long 1021339088
+ .long 44573696
+ .long 1071492443
+ .long 3936281395
+ .long 1023014829
+ .long 2226905344
+ .long 1071510781
+ .long 1515320476
+ .long 1024320623
+ .long 2800512512
+ .long 1071529160
+ .long 1225403697
+ .long 1021081846
+ .long 161113600
+ .long 1071547581
+ .long 3064809733
+ .long 1024173917
+ .long 1338410240
+ .long 1071566043
+ .long 2027604973
+ .long 1024362526
+ .long 522433280
+ .long 1071584548
+ .long 2055171723
+ .long 1023858825
+ .long 539595776
+ .long 1071603096
+ .long 3868820135
+ .long 1022936424
+ .long 4264017664
+ .long 1071621687
+ .long 3228065145
+ .long 1023479578
+ .long 1733924096
+ .long 1071640324
+ .long 3511934475
+ .long 1022496355
+ .long 108880384
+ .long 1071651839
+ .long 615880967
+ .long 1023519706
+ .long 3517856512
+ .long 1071661202
+ .long 3113108559
+ .long 1025190289
+ .long 4043153152
+ .long 1071670589
+ .long 1571836218
+ .long 1023106116
+ .long 3251299072
+ .long 1071680000
+ .long 3444076102
+ .long 1022187841
+ .long 2736921600
+ .long 1071689435
+ .long 272771483
+ .long 1025095280
+ .long 3897698560
+ .long 1071703633
+ .long 2075390188
+ .long 1022489022
+ .long 3209485056
+ .long 1071722652
+ .long 1438094065
+ .long 1021844944
+ .long 3781432064
+ .long 1071741774
+ .long 1675017145
+ .long 1024143828
+ .long 2684184064
+ .long 1071761003
+ .long 2259963753
+ .long 1024731393
+ .long 1840489728
+ .long 1071780342
+ .long 3372883597
+ .long 1023431408
+ .long 3764087808
+ .long 1071799794
+ .long 3307523102
+ .long 1024485788
+ .long 3006232320
+ .long 1071819364
+ .long 3088971966
+ .long 1025213251
+ .long 3374881280
+ .long 1071839055
+ .long 834437749
+ .long 1025236452
+ .long 797284864
+ .long 1071858872
+ .long 3122663941
+ .long 1025320473
+ .long 545765120
+ .long 1071878818
+ .long 826539625
+ .long 1022450955
+ .long 107562240
+ .long 1071898898
+ .long 339584600
+ .long 1022481255
+ .long 2123649024
+ .long 1071919116
+ .long 3912959833
+ .long 1024321009
+ .long 1562385664
+ .long 1071939478
+ .long 2846067230
+ .long 1023343981
+ .long 2963085824
+ .long 1071959988
+ .long 954548627
+ .long 1021475211
+ .long 3325550592
+ .long 1071980652
+ .long 3459651155
+ .long 1025305573
+ .long 775752448
+ .long 1072001476
+ .long 3582746667
+ .long 1023859460
+ .long 3238590720
+ .long 1072022464
+ .long 634636162
+ .long 1024472353
+ .long 2758801920
+ .long 1072043624
+ .long 3078216319
+ .long 1025304516
+ .long 1370319104
+ .long 1072064962
+ .long 2570569078
+ .long 1025099442
+ .long 2615805184
+ .long 1072086484
+ .long 3729933412
+ .long 1024605112
+ .long 3077336576
+ .long 1072108198
+ .long 1948916066
+ .long 1024781603
+ .long 1099528192
+ .long 1072130112
+ .long 3139143157
+ .long 1023729360
+ .long 1231903232
+ .long 1072152233
+ .long 1349513477
+ .long 1024737515
+ .long 1507504128
+ .long 1072174570
+ .long 3484516322
+ .long 1024000959
+ .long 2214659840
+ .long 1072197132
+ .long 2563820917
+ .long 1025225535
+ .long 1804739840
+ .long 1072219929
+ .long 760038746
+ .long 1024482855
+ .long 1413746688
+ .long 1072242971
+ .long 3401734714
+ .long 1025129838
+ .long 821409536
+ .long 1072266269
+ .long 3729772551
+ .long 1025484796
+ .long 3031825664
+ .long 1072289834
+ .long 122256749
+ .long 1024752594
+ .long 1710784256
+ .long 1072313680
+ .long 1518205483
+ .long 1024724809
+ .long 3025265152
+ .long 1072337819
+ .long 409951989
+ .long 1022835555
+ .long 287769088
+ .long 1072362267
+ .long 800355594
+ .long 1022484850
+ .long 198179840
+ .long 1072387038
+ .long 3502926213
+ .long 1024209373
+ .long 1909130496
+ .long 1072412149
+ .long 3064694319
+ .long 1025380823
+ .long 1941732096
+ .long 1072437619
+ .long 4112930390
+ .long 1024294679
+ .long 3492010496
+ .long 1072463467
+ .long 2684918107
+ .long 1023220233
+ .long 81959680
+ .long 1072489716
+ .long 220021366
+ .long 1020635131
+ .long 2297837056
+ .long 1072516387
+ .long 4027683826
+ .long 1021041185
+ .long 270404096
+ .long 1072543508
+ .long 2012766065
+ .long 1021780753
+ .long 3667376896
+ .long 1072571105
+ .long 2727981522
+ .long 1023009874
+ .long 330400256
+ .long 1072599212
+ .long 2940017003
+ .long 1025393439
+ .long 1119293952
+ .long 1072627861
+ .long 1608550416
+ .long 1022675612
+ .long 3536155904
+ .long 1072657091
+ .long 349665778
+ .long 1025156751
+ .long 3078046720
+ .long 1072686946
+ .long 2016159996
+ .long 1022193169
+ .long 455228416
+ .long 1072705361
+ .long 1908539328
+ .long 1026126332
+ .long 1871505664
+ .long 1072720988
+ .long 2784700894
+ .long 1025922277
+ .long 1630994432
+ .long 1072737010
+ .long 361107678
+ .long 1022887244
+ .long 2084558336
+ .long 1072753462
+ .long 2642784509
+ .long 1072689083
+ .long 1514442531
+ .long 1072688953
+ .long 333108933
+ .long 1072688821
+ .long 3392112024
+ .long 1072688686
+ .long 2099852862
+ .long 1072688550
+ .long 749609004
+ .long 1072688412
+ .long 3634632596
+ .long 1072688271
+ .long 2163248461
+ .long 1072688129
+ .long 628657846
+ .long 1072687985
+ .long 3324036511
+ .long 1072687838
+ .long 1657632815
+ .long 1072687690
+ .long 4217538760
+ .long 1072687539
+ .long 2411951597
+ .long 1072687387
+ .long 533944872
+ .long 1072687233
+ .long 2876566508
+ .long 1072687076
+ .long 847936891
+ .long 1072686918
+ .long 3036019913
+ .long 1072686757
+ .long 848884575
+ .long 1072686595
+ .long 2874443326
+ .long 1072686430
+ .long 520713666
+ .long 1072686264
+ .long 2375556481
+ .long 1072686095
+ .long 4141904948
+ .long 1072685924
+ .long 1522666382
+ .long 1072685752
+ .long 3105624104
+ .long 1072685577
+ .long 298666327
+ .long 1072685401
+ .long 1689524500
+ .long 1072685222
+ .long 2981002200
+ .long 1072685041
+ .long 4170844284
+ .long 1072684858
+ .long 961802263
+ .long 1072684674
+ .long 1941503454
+ .long 1072684487
+ .long 2812647170
+ .long 1072684298
+ .long 3572873869
+ .long 1072684107
+ .long 4219797823
+ .long 1072683914
+ .long 456039788
+ .long 1072683720
+ .long 869096151
+ .long 1072683523
+ .long 1161535119
+ .long 1072683324
+ .long 1330865866
+ .long 1072683123
+ .long 1374571204
+ .long 1072682920
+ .long 1290107538
+ .long 1072682715
+ .long 1074904836
+ .long 1072682508
+ .long 726366587
+ .long 1072682299
+ .long 241869763
+ .long 1072682088
+ .long 3913732079
+ .long 1072681874
+ .long 3149342765
+ .long 1072681659
+ .long 2240966306
+ .long 1072681442
+ .long 1185873216
+ .long 1072681223
+ .long 4276274591
+ .long 1072681001
+ .long 2919452883
+ .long 1072680778
+ .long 1407565635
+ .long 1072680553
+ .long 4032743551
+ .long 1072680325
+ .long 2202188565
+ .long 1072680096
+ .long 207977577
+ .long 1072679865
+ .long 2342160518
+ .long 1072679631
+ .long 11858423
+ .long 1072679396
+ .long 1804034453
+ .long 1072679158
+ .long 3420722787
+ .long 1072678918
+ .long 563930456
+ .long 1072678677
+ .long 1820539192
+ .long 1072678433
+ .long 2892501606
+ .long 1072678187
+ .long 3776710320
+ .long 1072677939
+ .long 175063337
+ .long 1072677690
+ .long 674333171
+ .long 1072677438
+ .long 976363026
+ .long 1072677184
+ .long 1077935934
+ .long 1072676928
+ .long 1921075490
+ .long 1072676540
+ .long 881493302
+ .long 1072676016
+ .long 3275752439
+ .long 1072675483
+ .long 486855588
+ .long 1072674943
+ .long 1077229111
+ .long 1072674394
+ .long 723950308
+ .long 1072673837
+ .long 3693582199
+ .long 1072673271
+ .long 1367335316
+ .long 1072672698
+ .long 2305837020
+ .long 1072672116
+ .long 2184358641
+ .long 1072671526
+ .long 972682840
+ .long 1072670928
+ .long 2935101762
+ .long 1072670321
+ .long 3745513263
+ .long 1072669706
+ .long 3372320886
+ .long 1072669083
+ .long 1783464620
+ .long 1072668452
+ .long 3241386215
+ .long 1072667812
+ .long 3418125284
+ .long 1072667164
+ .long 2280219148
+ .long 1072666508
+ .long 4088700758
+ .long 1072665843
+ .long 219227400
+ .long 1072665171
+ .long 3521816918
+ .long 1072664489
+ .long 1076205279
+ .long 1072663800
+ .long 1436484616
+ .long 1072663102
+ .long 271362610
+ .long 1072662396
+ .long 1838996688
+ .long 1072661681
+ .long 1807122518
+ .long 1072660958
+ .long 137953542
+ .long 1072660227
+ .long 1088178584
+ .long 1072659487
+ .long 324057537
+ .long 1072658739
+ .long 2101288076
+ .long 1072657982
+ .long 2085133974
+ .long 1072657217
+ .long 235324451
+ .long 1072656444
+ .long 806051592
+ .long 1072655662
+ .long 3756033140
+ .long 1072654871
+ .long 453542543
+ .long 1072654073
+ .long 3741177327
+ .long 1072653265
+ .long 691216109
+ .long 1072652450
+ .long 4145223372
+ .long 1072651625
+ .long 1174439091
+ .long 1072650793
+ .long 324416139
+ .long 1072649952
+ .long 1550246310
+ .long 1072649102
+ .long 511524674
+ .long 1072648244
+ .long 1457248482
+ .long 1072647377
+ .long 45944955
+ .long 1072646502
+ .long 525537397
+ .long 1072645618
+ .long 2848440188
+ .long 1072644725
+ .long 2671555633
+ .long 1072643824
+ .long 4241172637
+ .long 1072642914
+ .long 3213094278
+ .long 1072641996
+ .long 3832503688
+ .long 1072641069
+ .long 1754091534
+ .long 1072640134
+ .long 1221921804
+ .long 1072639190
+ .long 2184526489
+ .long 1072638237
+ .long 294902089
+ .long 1072637276
+ .long 4090375270
+ .long 1072636305
+ .long 632860906
+ .long 1072635327
+ .long 2753498702
+ .long 1072634339
+ .long 1808009252
+ .long 1072633343
+ .long 2036428672
+ .long 1072632338
+ .long 3383235626
+ .long 1072631324
+ .long 1497347484
+ .long 1072630302
+ .long 617018317
+ .long 1072629271
+ .long 684933058
+ .long 1072628231
+ .long 1643170798
+ .long 1072627182
+ .long 3011066360
+ .long 1072625592
+ .long 957158713
+ .long 1072623442
+ .long 1390907941
+ .long 1072621256
+ .long 3819155270
+ .long 1072619034
+ .long 3443571196
+ .long 1072616777
+ .long 4045412458
+ .long 1072614484
+ .long 805503923
+ .long 1072612156
+ .long 1778922015
+ .long 1072609791
+ .long 2125033665
+ .long 1072607390
+ .long 1287203863
+ .long 1072604953
+ .long 2992629568
+ .long 1072602479
+ .long 2367267127
+ .long 1072599969
+ .long 3115526047
+ .long 1072597422
+ .long 340219539
+ .long 1072594839
+ .long 2017215719
+ .long 1072592218
+ .long 3225443424
+ .long 1072589560
+ .long 3326565673
+ .long 1072586865
+ .long 1669811211
+ .long 1072584133
+ .long 1886735022
+ .long 1072581363
+ .long 3301071171
+ .long 1072578555
+ .long 928514283
+ .long 1072575710
+ .long 2656364059
+ .long 1072572826
+ .long 3473490507
+ .long 1072569904
+ .long 2649965606
+ .long 1072566944
+ .long 3736819052
+ .long 1072563945
+ .long 1680885175
+ .long 1072560908
+ .long 4413771
+ .long 1072557832
+ .long 2214869753
+ .long 1072554716
+ .long 3214725184
+ .long 1072551561
+ .long 2186079903
+ .long 1072548367
+ .long 2590372131
+ .long 1072545133
+ .long 3578146079
+ .long 1072541859
+ .long 4283712755
+ .long 1072538545
+ .long 3824834510
+ .long 1072535191
+ .long 1302400298
+ .long 1072531797
+ .long 95058636
+ .long 1072528362
+ .long 3563906063
+ .long 1072524885
+ .long 2167230730
+ .long 1072521368
+ .long 3524918334
+ .long 1072517809
+ .long 2353304918
+ .long 1072514209
+ .long 1939625839
+ .long 1072510567
+ .long 1256714581
+ .long 1072506883
+ .long 3552525848
+ .long 1072503156
+ .long 3464809522
+ .long 1072499387
+ .long 4200542593
+ .long 1072495575
+ .long 355609124
+ .long 1072491721
+ .long 3684139099
+ .long 1072487822
+ .long 148355918
+ .long 1072483881
+ .long 1457689242
+ .long 1072479895
+ .long 2118591596
+ .long 1072475865
+ .long 908848089
+ .long 1072471791
+ .long 877032689
+ .long 1072467672
+ .long 752012304
+ .long 1072463508
+ .long 3532301749
+ .long 1072459298
+ .long 3600563221
+ .long 1072455043
+ .long 3902857084
+ .long 1072450742
+ .long 3063101036
+ .long 1072446395
+ .long 3972344374
+ .long 1072442001
+ .long 903183549
+ .long 1072437561
+ .long 983892938
+ .long 1072433073
+ .long 2722858568
+ .long 1072428537
+ .long 302790515
+ .long 1072423954
+ .long 759811057
+ .long 1072419322
+ .long 2507809922
+ .long 1072414641
+ .long 2388408813
+ .long 1072407528
+ .long 2084492942
+ .long 1072397870
+ .long 2435703301
+ .long 1072388010
+ .long 1935433360
+ .long 1072377945
+ .long 2742047290
+ .long 1072367671
+ .long 2053284205
+ .long 1072357185
+ .long 657783367
+ .long 1072346483
+ .long 2893664841
+ .long 1072335560
+ .long 3718906405
+ .long 1072324413
+ .long 1547896303
+ .long 1072313038
+ .long 2494058440
+ .long 1072301429
+ .long 3133238742
+ .long 1072289582
+ .long 3327000086
+ .long 1072277492
+ .long 1860667274
+ .long 1072265154
+ .long 665340747
+ .long 1072252562
+ .long 443347841
+ .long 1072239710
+ .long 581282618
+ .long 1072226592
+ .long 3349780465
+ .long 1072213201
+ .long 914217606
+ .long 1072199532
+ .long 989797661
+ .long 1072185576
+ .long 945436416
+ .long 1072171326
+ .long 549291300
+ .long 1072156774
+ .long 1814636389
+ .long 1072141911
+ .long 239092858
+ .long 1072126729
+ .long 1794680724
+ .long 1072111217
+ .long 1241534678
+ .long 1072095366
+ .long 3366566214
+ .long 1072079164
+ .long 1244090828
+ .long 1072062601
+ .long 1708448120
+ .long 1072045663
+ .long 3544260650
+ .long 1072028337
+ .long 1402741403
+ .long 1072010610
+ .long 2551936888
+ .long 1071992465
+ .long 617669739
+ .long 1071973887
+ .long 794002186
+ .long 1071954857
+ .long 2021237693
+ .long 1071935356
+ .long 540450384
+ .long 1071915364
+ .long 1920555537
+ .long 1071894857
+ .long 2879585206
+ .long 1071873811
+ .long 3000237455
+ .long 1071852199
+ .long 3352974346
+ .long 1071829991
+ .long 569629937
+ .long 1071807155
+ .long 2077237208
+ .long 1071783653
+ .long 2284891805
+ .long 1071759446
+ .long 1226651784
+ .long 1071734489
+ .long 1102047405
+ .long 1071708731
+ .long 2009896384
+ .long 1071682115
+ .long 927419082
+ .long 1071654577
+ .long 85010366
+ .long 1071607413
+ .long 696431025
+ .long 1071548180
+ .long 2611410541
+ .long 1071486585
+ .long 2612593658
+ .long 1071422396
+ .long 3548155306
+ .long 1071355336
+ .long 3887997484
+ .long 1071285073
+ .long 244854763
+ .long 1071211202
+ .long 4214445648
+ .long 1071133216
+ .long 2303966727
+ .long 1071050478
+ .long 3991040013
+ .long 1070962152
+ .long 3126952278
+ .long 1070867118
+ .long 1817448378
+ .long 1070763804
+ .long 1793814864
+ .long 1070649884
+ .long 3507224072
+ .long 1070447193
+ .long 4027609105
+ .long 1070148772
+ .long 577507993
+ .long 1069779414
+ .long 2310232419
+ .long 1068931829
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 3164710438
+ .long 1413754136
+ .long 3221823995
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 1074340347
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 1431655765
+ .long 3217380693
+ .long 858993459
+ .long 3216192307
+ .long 3067833783
+ .long 3215383405
+ .long 780903145
+ .long 1066854586
+ .long 858993459
+ .long 1068708659
+ .long 3340530119
+ .long 1067392113
+ .long 1431655765
+ .long 1069897045
+ .long 1321528399
+ .long 1066517740
+ .long 3067833783
+ .long 1067899757
+ .long 2021159460
+ .long 1065855096
+ .long 2576980378
+ .long 1066178969
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 0
+ .long 0
+ .long 4294950912
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 0
+ .type static_const_table,@object
+ .size static_const_table,6112
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_asin.S b/libm/x86/e_asin.S
new file mode 100644
index 0000000..5d7f331
--- /dev/null
+++ b/libm/x86/e_asin.S
@@ -0,0 +1,2003 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// To compute asin(s), separate schemes are used when s is in different
+// intervals.
+//
+// |s| in [2^{-4}, sqrt(3)/2):
+// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52
+// asin(s)=asin(t)+asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2)
+// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7)
+// For the first degree term, r is evaluated as
+// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t)
+// (sqrt(1-t^2) read from table)
+// The main source of error is still R (may still be affected by up to 3 ulps
+// of rounding error). The table size must be sufficiently large, to minimize
+// this effect.
+//
+// |s| in [sqrt(3)/2, 255/256):
+// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded)
+// asin(|s|)=pi/2-asin(t)+asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2)
+// asin(r) evaluated as polynomial (same as above)
+// The first degree term is evaluated as
+// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2))
+//
+// |s|<2^{-4}: evaluate as 13-degree polynomial
+//
+// |s| in [255/256,1): asin(|s|)=pi/2-asin(sqrt(1-s^2))
+// use 17-degree polynomial, get error term
+// Q*eps ~ (1-s^2-Q^2)/(2*Q) for first term
+// ( Q(1+eps)=sqrt(1-s^2) )
+//
+// Special cases:
+// asin(NaN) = quiet NaN, and raise invalid exception
+// asin(INF) = QNaN and raise invalid exception
+// asin(x) = QNaN and raise invalid exception, for |x|>1.0
+// asin(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin asin
+ENTRY(asin)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 64(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ stmxcsr 16(%esp)
+ movl 16(%esp), %edx
+ andl $-24577, %edx
+ cmpl %edx, 16(%esp)
+ jne .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ movsd 5984(%ebx), %xmm4
+ movsd 6016(%ebx), %xmm3
+ xorpd %xmm5, %xmm5
+ movsd 6000(%ebx), %xmm2
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movapd %xmm0, %xmm1
+ movsd %xmm0, 8(%esp)
+ psrlq $44, %xmm0
+ movd %xmm0, %edx
+ movapd %xmm1, %xmm7
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movapd %xmm1, %xmm0
+ movl $524287, %eax
+ andl %edx, %eax
+ subl $260864, %eax
+ cmpl $955, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ mulsd %xmm1, %xmm1
+ andl $65535, %edx
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andpd %xmm7, %xmm2
+ andl $-4, %edx
+ subl $64256, %edx
+ movsd 3936(%ebx,%edx,2), %xmm1
+ orpd %xmm5, %xmm2
+ movapd 96(%ebx,%edx,4), %xmm4
+ movapd %xmm7, %xmm6
+ addsd %xmm2, %xmm7
+ subsd %xmm2, %xmm0
+ mulsd %xmm7, %xmm0
+ mulsd %xmm1, %xmm6
+ mulsd %xmm2, %xmm3
+ movapd %xmm6, %xmm1
+ addsd %xmm3, %xmm6
+ divsd %xmm6, %xmm0
+ movsd 80(%ebx), %xmm7
+ movsd 64(%ebx), %xmm5
+ subsd %xmm3, %xmm1
+ andpd 6064(%ebx), %xmm2
+ movapd %xmm1, %xmm3
+ mulsd %xmm1, %xmm1
+ movsd 72(%ebx), %xmm6
+ mulsd %xmm1, %xmm3
+ mulsd %xmm1, %xmm7
+ mulsd %xmm3, %xmm5
+ xorpd %xmm2, %xmm4
+ mulsd %xmm1, %xmm3
+ addsd %xmm7, %xmm6
+ mulsd %xmm3, %xmm6
+ addsd %xmm4, %xmm5
+ pshufd $238, %xmm4, %xmm4
+ addsd %xmm5, %xmm6
+ orpd %xmm2, %xmm4
+ addsd %xmm6, %xmm0
+ movl 16(%esp), %eax
+ andl $-24577, %eax
+ cmpl 16(%esp), %eax
+ je .L_2TAG_PACKET_3.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %eax
+ andl $24576, %eax
+ orl %eax, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_3.0.2:
+ addsd %xmm4, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_2.0.2:
+ subl $955, %eax
+ cmpl $67, %eax
+ jae .L_2TAG_PACKET_5.0.2
+ mulsd %xmm1, %xmm1
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ movl %edx, %eax
+ andpd 5984(%ebx), %xmm0
+ andpd 6048(%ebx), %xmm7
+ movapd %xmm0, %xmm1
+ movsd 6016(%ebx), %xmm4
+ movapd %xmm7, %xmm6
+ subsd %xmm7, %xmm1
+ mulsd %xmm7, %xmm7
+ addsd %xmm6, %xmm0
+ subsd %xmm7, %xmm4
+ mulsd %xmm1, %xmm0
+ movapd %xmm3, %xmm7
+ andpd %xmm3, %xmm2
+ psllq $2, %xmm3
+ pextrw $3, %xmm3, %edx
+ orpd %xmm5, %xmm2
+ subl $65216, %edx
+ addl %edx, %edx
+ mulsd 3936(%ebx,%edx,4), %xmm7
+ mulsd %xmm2, %xmm6
+ movapd 6080(%ebx), %xmm3
+ mulsd %xmm2, %xmm1
+ mulsd %xmm2, %xmm2
+ subsd %xmm7, %xmm6
+ addsd %xmm1, %xmm6
+ subsd %xmm2, %xmm4
+ addsd %xmm7, %xmm7
+ movsd 64(%ebx), %xmm5
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm7
+ movsd 80(%ebx), %xmm0
+ divsd %xmm7, %xmm4
+ movsd 72(%ebx), %xmm2
+ subpd 96(%ebx,%edx,8), %xmm3
+ movapd %xmm6, %xmm1
+ mulsd %xmm6, %xmm6
+ andl $524288, %eax
+ shrl $4, %eax
+ mulsd %xmm6, %xmm0
+ mulsd %xmm6, %xmm1
+ mulsd %xmm1, %xmm5
+ mulsd %xmm6, %xmm1
+ addsd %xmm2, %xmm0
+ pxor %xmm6, %xmm6
+ mulsd %xmm1, %xmm0
+ addsd %xmm3, %xmm5
+ pinsrw $3, %eax, %xmm6
+ addsd %xmm5, %xmm0
+ movapd %xmm4, %xmm5
+ pshufd $238, %xmm3, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm3
+ subsd %xmm3, %xmm5
+ subsd %xmm5, %xmm0
+ movl 16(%esp), %eax
+ andl $-24577, %eax
+ cmpl 16(%esp), %eax
+ je .L_2TAG_PACKET_6.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %eax
+ andl $24576, %eax
+ orl %eax, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm6, %xmm0
+ xorpd %xmm6, %xmm4
+ subsd %xmm4, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ addl $15291, %eax
+ cmpl $14336, %eax
+ jae .L_2TAG_PACKET_7.0.2
+ unpcklpd %xmm7, %xmm7
+ movapd (%ebx), %xmm1
+ movapd %xmm7, %xmm6
+ movapd 16(%ebx), %xmm2
+ movapd 32(%ebx), %xmm4
+ mulpd %xmm7, %xmm7
+ mulpd %xmm7, %xmm6
+ mulpd %xmm7, %xmm1
+ mulpd %xmm7, %xmm7
+ movapd %xmm6, %xmm3
+ mulsd %xmm6, %xmm6
+ addpd %xmm2, %xmm1
+ mulpd %xmm7, %xmm4
+ mulsd %xmm3, %xmm6
+ addpd %xmm4, %xmm1
+ mulpd %xmm6, %xmm1
+ pshufd $238, %xmm1, %xmm2
+ addsd %xmm2, %xmm1
+ movl 16(%esp), %eax
+ andl $-24577, %eax
+ cmpl 16(%esp), %eax
+ je .L_2TAG_PACKET_8.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %eax
+ andl $24576, %eax
+ orl %eax, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_8.0.2:
+ addsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_7.0.2:
+ subl $15358, %eax
+ cmpl $2, %eax
+ jae .L_2TAG_PACKET_9.0.2
+ mulsd %xmm1, %xmm1
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ movl %edx, %eax
+ andpd 6032(%ebx), %xmm7
+ pshufd $68, %xmm3, %xmm5
+ andpd 6032(%ebx), %xmm3
+ movapd %xmm7, %xmm1
+ movsd 6016(%ebx), %xmm4
+ movapd %xmm7, %xmm6
+ subsd %xmm7, %xmm0
+ mulsd %xmm7, %xmm7
+ addsd %xmm1, %xmm1
+ mulsd %xmm0, %xmm1
+ subsd %xmm7, %xmm4
+ movapd %xmm3, %xmm6
+ mulsd %xmm3, %xmm3
+ mulsd %xmm0, %xmm0
+ subsd %xmm1, %xmm4
+ subsd %xmm5, %xmm6
+ addsd %xmm5, %xmm5
+ subsd %xmm3, %xmm4
+ movapd (%ebx), %xmm2
+ pshufd $238, %xmm5, %xmm3
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm5
+ pshufd $238, %xmm3, %xmm7
+ addsd %xmm3, %xmm3
+ mulsd %xmm6, %xmm5
+ addsd %xmm5, %xmm4
+ pshufd $238, %xmm7, %xmm6
+ divsd %xmm3, %xmm4
+ movapd 48(%ebx), %xmm1
+ movapd 16(%ebx), %xmm5
+ movapd 32(%ebx), %xmm0
+ mulpd %xmm7, %xmm7
+ movapd %xmm6, %xmm3
+ mulpd %xmm7, %xmm2
+ mulpd %xmm7, %xmm6
+ shrl $4, %eax
+ andl $32768, %eax
+ mulsd %xmm7, %xmm1
+ mulpd %xmm7, %xmm7
+ addpd %xmm2, %xmm5
+ movapd %xmm6, %xmm2
+ mulsd %xmm6, %xmm6
+ mulpd %xmm0, %xmm7
+ movapd 6080(%ebx), %xmm0
+ mulsd %xmm6, %xmm2
+ addpd %xmm5, %xmm7
+ pshufd $238, %xmm1, %xmm5
+ mulsd %xmm2, %xmm6
+ mulpd %xmm2, %xmm7
+ addsd %xmm5, %xmm1
+ xorpd %xmm5, %xmm5
+ pshufd $238, %xmm7, %xmm2
+ mulsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm2, %xmm7
+ movapd %xmm3, %xmm2
+ pinsrw $3, %eax, %xmm5
+ subsd %xmm6, %xmm3
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm6
+ addsd %xmm4, %xmm7
+ subsd %xmm6, %xmm2
+ subsd %xmm7, %xmm0
+ subsd %xmm2, %xmm0
+ movl 16(%esp), %eax
+ andl $-24577, %eax
+ cmpl 16(%esp), %eax
+ je .L_2TAG_PACKET_10.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %eax
+ andl $24576, %eax
+ orl %eax, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_10.0.2:
+ xorpd %xmm5, %xmm0
+ xorpd %xmm5, %xmm3
+ subsd %xmm3, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_9.0.2:
+ addl $261886, %eax
+ cmpl $261888, %eax
+ jb .L_2TAG_PACKET_11.0.2
+ movd %xmm0, %ecx
+ psrlq $32, %xmm0
+ movd %xmm0, %edx
+ andl $2147483647, %edx
+ movl $1072693248, %eax
+ subl %edx, %eax
+ orl %ecx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_12.0.2
+ movq 8(%esp), %xmm2
+ movd %xmm2, %edx
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $2147483647, %ecx
+ subl $1, %edx
+ sbbl $2146435072, %ecx
+ cmpl $0, %ecx
+ jge .L_2TAG_PACKET_11.0.2
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_13.0.2
+.L_2TAG_PACKET_12.0.2:
+ movsd 5984(%ebx), %xmm1
+ movsd 6080(%ebx), %xmm2
+ movsd 6088(%ebx), %xmm0
+ movl 16(%esp), %eax
+ andl $-24577, %eax
+ cmpl 16(%esp), %eax
+ je .L_2TAG_PACKET_14.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %eax
+ andl $24576, %eax
+ orl %eax, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_14.0.2:
+ andnpd %xmm7, %xmm1
+ orpd %xmm1, %xmm0
+ orpd %xmm1, %xmm2
+ addsd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_0.0.2:
+ movl 16(%esp), %edx
+ andl $-24577, %edx
+ movl %edx, 24(%esp)
+ ldmxcsr 24(%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_11.0.2:
+ movsd 8(%esp), %xmm0
+ xorpd %xmm6, %xmm6
+ movapd %xmm0, %xmm7
+ pextrw $3, %xmm0, %edx
+ andl $32752, %edx
+ subl $16, %edx
+ cmpl $32736, %edx
+ jb .L_2TAG_PACKET_15.0.2
+ addsd %xmm0, %xmm6
+ orpd %xmm6, %xmm0
+ mulsd %xmm0, %xmm7
+.L_2TAG_PACKET_15.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+.L_2TAG_PACKET_13.0.2:
+ movl 16(%esp), %edx
+ andl $-24577, %edx
+ cmpl 16(%esp), %edx
+ je .L_2TAG_PACKET_4.0.2
+ stmxcsr 24(%esp)
+ movl 16(%esp), %edx
+ andl $24576, %edx
+ orl %edx, 24(%esp)
+ ldmxcsr 24(%esp)
+.L_2TAG_PACKET_4.0.2:
+ movl 64(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(asin)
+# -- End asin
+
+# Start file scope ASM
+ALIAS_SYMBOL(asinl, asin);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 780903145
+ .long 1066854586
+ .long 858993459
+ .long 1068708659
+ .long 3340530119
+ .long 1067392113
+ .long 1431655765
+ .long 1069897045
+ .long 1321528399
+ .long 1066517740
+ .long 3067833783
+ .long 1067899757
+ .long 2021159460
+ .long 1065855096
+ .long 2576980378
+ .long 1066178969
+ .long 1431655765
+ .long 1069897045
+ .long 858993459
+ .long 1068708659
+ .long 3067833783
+ .long 1067899757
+ .long 0
+ .long 0
+ .long 3822952792
+ .long 1021639372
+ .long 182792448
+ .long 1068507836
+ .long 2264213271
+ .long 1019558908
+ .long 649052928
+ .long 1068524253
+ .long 1797139609
+ .long 1022295143
+ .long 1243095296
+ .long 1068540671
+ .long 1415938756
+ .long 1021439537
+ .long 2033294592
+ .long 1068557090
+ .long 2356809978
+ .long 1021777916
+ .long 3088063744
+ .long 1068573510
+ .long 2669055318
+ .long 1022124482
+ .long 180888576
+ .long 1068589932
+ .long 3566445325
+ .long 1021358712
+ .long 1970196992
+ .long 1068606354
+ .long 896980323
+ .long 1021319659
+ .long 4229555456
+ .long 1068622777
+ .long 436049712
+ .long 1021319758
+ .long 2732572160
+ .long 1068639202
+ .long 583123209
+ .long 1020797960
+ .long 1842831872
+ .long 1068655628
+ .long 1370449804
+ .long 1021429270
+ .long 1628994560
+ .long 1068672055
+ .long 2411391464
+ .long 1021057980
+ .long 2159763712
+ .long 1068688483
+ .long 1208692749
+ .long 1021943903
+ .long 3503886336
+ .long 1068704912
+ .long 538793309
+ .long 1019744063
+ .long 1435187200
+ .long 1068721343
+ .long 4085087612
+ .long 1020608419
+ .long 317469952
+ .long 1068737775
+ .long 144386942
+ .long 1021440732
+ .long 219617280
+ .long 1068754208
+ .long 2940088361
+ .long 1019981122
+ .long 1210558208
+ .long 1068770642
+ .long 2176850347
+ .long 1018373705
+ .long 3359268352
+ .long 1068787077
+ .long 2395611454
+ .long 1021889042
+ .long 2439803648
+ .long 1068803514
+ .long 1650705253
+ .long 1020227966
+ .long 2816203520
+ .long 1068819952
+ .long 3702166386
+ .long 1019379914
+ .long 262620672
+ .long 1068836392
+ .long 1855649370
+ .long 1020453124
+ .long 3438159616
+ .long 1068852832
+ .long 923063860
+ .long 1019273834
+ .long 3822105856
+ .long 1068869274
+ .long 4289947947
+ .long 1019434249
+ .long 1483729920
+ .long 1068885718
+ .long 787455814
+ .long 1020738379
+ .long 787321088
+ .long 1068902163
+ .long 3321653337
+ .long 1021842569
+ .long 1802253312
+ .long 1068918609
+ .long 2653633526
+ .long 1021821525
+ .long 302985984
+ .long 1068935057
+ .long 161272028
+ .long 1021655149
+ .long 653966080
+ .long 1068951506
+ .long 2566098667
+ .long 1020066219
+ .long 2924727296
+ .long 1068967956
+ .long 3646493722
+ .long 1014292285
+ .long 2889890304
+ .long 1068984408
+ .long 1081009196
+ .long 1022189620
+ .long 619098112
+ .long 1069000862
+ .long 4011643355
+ .long 1021773297
+ .long 477017600
+ .long 1069017317
+ .long 4030305534
+ .long 1021292252
+ .long 2533403904
+ .long 1069033773
+ .long 2645187591
+ .long 1019527099
+ .long 2563102208
+ .long 1069050231
+ .long 3857293792
+ .long 1022311697
+ .long 635982336
+ .long 1069066691
+ .long 3625936637
+ .long 1017511744
+ .long 1116940800
+ .long 1069083152
+ .long 3653872993
+ .long 1022016631
+ .long 4075964160
+ .long 1069099614
+ .long 2468900271
+ .long 1021769532
+ .long 993165568
+ .long 1069116079
+ .long 1358104224
+ .long 1021199776
+ .long 528586752
+ .long 1069132545
+ .long 2200950332
+ .long 1022024872
+ .long 2752395776
+ .long 1069149012
+ .long 3197072454
+ .long 1017751319
+ .long 3439855616
+ .long 1069165481
+ .long 1651081806
+ .long 1020809338
+ .long 2661257728
+ .long 1069181952
+ .long 539032752
+ .long 1021728805
+ .long 486957312
+ .long 1069198425
+ .long 3136045149
+ .long 1016888671
+ .long 1282340352
+ .long 1069214899
+ .long 2593963259
+ .long 1018956103
+ .long 822921728
+ .long 1069231375
+ .long 2146032737
+ .long 1022306465
+ .long 3474216192
+ .long 1069247852
+ .long 3976811625
+ .long 1021350207
+ .long 716902656
+ .long 1069264332
+ .long 718267222
+ .long 1018624727
+ .long 1211594496
+ .long 1069280813
+ .long 1485641389
+ .long 1018447451
+ .long 734070272
+ .long 1069297296
+ .long 354455128
+ .long 1021341291
+ .long 3650110720
+ .long 1069313780
+ .long 682185947
+ .long 1021651853
+ .long 1440663040
+ .long 1069330267
+ .long 3558574550
+ .long 1021615110
+ .long 2766612224
+ .long 1069346755
+ .long 874607978
+ .long 1017746872
+ .long 3404011008
+ .long 1069363245
+ .long 4154988502
+ .long 1021439906
+ .long 3423949056
+ .long 1069379737
+ .long 2263202309
+ .long 1021479615
+ .long 2897587712
+ .long 1069396231
+ .long 2562065031
+ .long 1022090363
+ .long 1896159232
+ .long 1069412727
+ .long 3836237663
+ .long 1019867288
+ .long 490968576
+ .long 1069429225
+ .long 3322056743
+ .long 1006752762
+ .long 3048360192
+ .long 1069445724
+ .long 1152314833
+ .long 1013122252
+ .long 1049850624
+ .long 1069462226
+ .long 3601590727
+ .long 1022214610
+ .long 3156899584
+ .long 1069478729
+ .long 1855169970
+ .long 1019487271
+ .long 851173376
+ .long 1069495235
+ .long 312649594
+ .long 1020868604
+ .long 2794281728
+ .long 1069511742
+ .long 1093490181
+ .long 1020777577
+ .long 468042496
+ .long 1069528252
+ .long 1152540679
+ .long 1021403732
+ .long 2534219264
+ .long 1069544763
+ .long 2292126035
+ .long 1021872430
+ .long 1376146432
+ .long 1069558527
+ .long 3293753641
+ .long 1020500454
+ .long 4175442432
+ .long 1069575044
+ .long 3626347564
+ .long 1021610969
+ .long 3523113472
+ .long 1069591566
+ .long 339956500
+ .long 1021119039
+ .long 4003350528
+ .long 1069608092
+ .long 3429333082
+ .long 1022813542
+ .long 1611067392
+ .long 1069624623
+ .long 2298017544
+ .long 1021977587
+ .long 931782144
+ .long 1069641158
+ .long 2164684743
+ .long 1021250988
+ .long 2256725504
+ .long 1069657697
+ .long 1138762335
+ .long 1021443776
+ .long 1582853120
+ .long 1069674241
+ .long 1084010382
+ .long 1022994693
+ .long 3497758720
+ .long 1069690789
+ .long 406366244
+ .long 1022713586
+ .long 3999816960
+ .long 1069707342
+ .long 1488723042
+ .long 1023381290
+ .long 3383096064
+ .long 1069723900
+ .long 2541558953
+ .long 1019137887
+ .long 1942403584
+ .long 1069740463
+ .long 1879620343
+ .long 1022653642
+ .long 4268263680
+ .long 1069757030
+ .long 3039077047
+ .long 1022252545
+ .long 2067062272
+ .long 1069773603
+ .long 4190670677
+ .long 1020725863
+ .long 4225828096
+ .long 1069790180
+ .long 1998567321
+ .long 1022014385
+ .long 2452507136
+ .long 1069806763
+ .long 1511628873
+ .long 1021900300
+ .long 1340746240
+ .long 1069823351
+ .long 788367341
+ .long 1022726208
+ .long 1190035456
+ .long 1069839944
+ .long 3856337230
+ .long 1021834118
+ .long 2300688384
+ .long 1069856542
+ .long 3211396579
+ .long 1022621365
+ .long 678886400
+ .long 1069873146
+ .long 4001011887
+ .long 1022042646
+ .long 921594112
+ .long 1069889755
+ .long 557811968
+ .long 1023065533
+ .long 3331668992
+ .long 1069906369
+ .long 1877060679
+ .long 1022419742
+ .long 3917875200
+ .long 1069922989
+ .long 1181055171
+ .long 1022752712
+ .long 2984829696
+ .long 1069939615
+ .long 4294526932
+ .long 1021499988
+ .long 838049024
+ .long 1069956247
+ .long 3658081878
+ .long 1022957952
+ .long 2078928384
+ .long 1069972884
+ .long 820353701
+ .long 1019391107
+ .long 2719854336
+ .long 1069989527
+ .long 1644022489
+ .long 1023378240
+ .long 3069117696
+ .long 1070006176
+ .long 2771393702
+ .long 1019319954
+ .long 3435962368
+ .long 1070022831
+ .long 3876394145
+ .long 1023024433
+ .long 4130595328
+ .long 1070039492
+ .long 1630447748
+ .long 1021465882
+ .long 1169236224
+ .long 1070056160
+ .long 2828355997
+ .long 1020458120
+ .long 3453997312
+ .long 1070072833
+ .long 164091641
+ .long 1020388279
+ .long 2708127744
+ .long 1070089513
+ .long 3036550223
+ .long 1023328684
+ .long 3540797696
+ .long 1070106199
+ .long 3710949463
+ .long 1022568805
+ .long 1972276736
+ .long 1070122892
+ .long 3885277950
+ .long 1019761674
+ .long 2613815552
+ .long 1070139591
+ .long 2764165077
+ .long 1022921023
+ .long 1487791616
+ .long 1070156297
+ .long 1330644769
+ .long 1023162679
+ .long 3207593472
+ .long 1070173009
+ .long 3911007221
+ .long 1022993496
+ .long 3797764608
+ .long 1070189728
+ .long 979712598
+ .long 1022554580
+ .long 3578920448
+ .long 1070206454
+ .long 2825738223
+ .long 1020223708
+ .long 2872795648
+ .long 1070223187
+ .long 392451124
+ .long 1022666279
+ .long 2002258432
+ .long 1070239927
+ .long 3730407632
+ .long 1023148291
+ .long 1291326464
+ .long 1070256674
+ .long 3723802980
+ .long 1022514089
+ .long 1065180928
+ .long 1070273428
+ .long 2635617463
+ .long 1022654470
+ .long 1650181632
+ .long 1070290189
+ .long 2061982883
+ .long 1022853411
+ .long 3373882880
+ .long 1070306957
+ .long 319732785
+ .long 1022017175
+ .long 2270081280
+ .long 1070323733
+ .long 2237757411
+ .long 1023064087
+ .long 2963732736
+ .long 1070340516
+ .long 468839165
+ .long 1023293774
+ .long 1491099904
+ .long 1070357307
+ .long 1502657946
+ .long 1021533479
+ .long 2479636480
+ .long 1070374105
+ .long 482913562
+ .long 1021986286
+ .long 1968133632
+ .long 1070390911
+ .long 3281474337
+ .long 1022646400
+ .long 291639040
+ .long 1070407725
+ .long 2453320259
+ .long 1022812423
+ .long 2081472512
+ .long 1070424546
+ .long 2939989570
+ .long 1023091888
+ .long 3380340480
+ .long 1070441375
+ .long 2850707499
+ .long 1021921109
+ .long 232287488
+ .long 1070458213
+ .long 3674625342
+ .long 1020725130
+ .long 1567614208
+ .long 1070475058
+ .long 9347334
+ .long 1022024009
+ .long 3433091072
+ .long 1070491911
+ .long 282524999
+ .long 1021433523
+ .long 1876877312
+ .long 1070508773
+ .long 3470449440
+ .long 1019309721
+ .long 1538472192
+ .long 1070525643
+ .long 2089486825
+ .long 1019698916
+ .long 2763830784
+ .long 1070542521
+ .long 443498115
+ .long 1020505194
+ .long 1605381632
+ .long 1070559408
+ .long 3018871601
+ .long 1022869913
+ .long 2706946048
+ .long 1070576303
+ .long 3936260892
+ .long 1023175875
+ .long 2123887360
+ .long 1070593207
+ .long 2994220655
+ .long 1022825948
+ .long 104015104
+ .long 1070603108
+ .long 335054493
+ .long 1023441853
+ .long 2904568832
+ .long 1070615800
+ .long 1451215633
+ .long 1023853857
+ .long 3456197120
+ .long 1070632739
+ .long 436334733
+ .long 1024026432
+ .long 252452352
+ .long 1070649697
+ .long 34596167
+ .long 1024031396
+ .long 3328018432
+ .long 1070666672
+ .long 2644547073
+ .long 1024296758
+ .long 1255829248
+ .long 1070683667
+ .long 552832586
+ .long 1023763122
+ .long 4097058560
+ .long 1070700680
+ .long 1955640623
+ .long 1021394654
+ .long 451770112
+ .long 1070717714
+ .long 3428903777
+ .long 1022941142
+ .long 408920832
+ .long 1070734767
+ .long 165503263
+ .long 1023894958
+ .long 1186960640
+ .long 1070751840
+ .long 435826450
+ .long 1024026134
+ .long 19078656
+ .long 1070768934
+ .long 1834169749
+ .long 1022899284
+ .long 2743490304
+ .long 1070786048
+ .long 494581074
+ .long 1018818479
+ .long 2328961024
+ .long 1070803184
+ .long 2987908834
+ .long 1022581110
+ .long 350011392
+ .long 1070820342
+ .long 240771184
+ .long 1024143083
+ .long 2692326912
+ .long 1070837521
+ .long 666056837
+ .long 1022394776
+ .long 2373274368
+ .long 1070854723
+ .long 2484337770
+ .long 1024228156
+ .long 1017131520
+ .long 1070871948
+ .long 3285648279
+ .long 1024025789
+ .long 265558272
+ .long 1070889196
+ .long 392241896
+ .long 1024252809
+ .long 1778008064
+ .long 1070906467
+ .long 1536107943
+ .long 1023949300
+ .long 2937184768
+ .long 1070923762
+ .long 3541062251
+ .long 1019448646
+ .long 1144442880
+ .long 1070941082
+ .long 3691683781
+ .long 1022123948
+ .long 2410165504
+ .long 1070958426
+ .long 1804181960
+ .long 1023945221
+ .long 4174350848
+ .long 1070975795
+ .long 2016094861
+ .long 1021716585
+ .long 3897012480
+ .long 1070993190
+ .long 175294410
+ .long 1023703404
+ .long 3353623040
+ .long 1071010611
+ .long 167973242
+ .long 1023240839
+ .long 45671168
+ .long 1071028059
+ .long 2166856113
+ .long 1021565413
+ .long 86063872
+ .long 1071045533
+ .long 2676254727
+ .long 1023985299
+ .long 1019772672
+ .long 1071063034
+ .long 989043593
+ .long 1021549587
+ .long 414297344
+ .long 1071080563
+ .long 3960972046
+ .long 1024307251
+ .long 155173120
+ .long 1071098120
+ .long 1830919291
+ .long 1021592251
+ .long 2151562240
+ .long 1071115705
+ .long 405408666
+ .long 1023423128
+ .long 4041854720
+ .long 1071133319
+ .long 2043497827
+ .long 1024411503
+ .long 3489224192
+ .long 1071150963
+ .long 3072215864
+ .long 1022698635
+ .long 2477196288
+ .long 1071168637
+ .long 1812195139
+ .long 1022689192
+ .long 3015298816
+ .long 1071186341
+ .long 764841969
+ .long 1021027331
+ .long 2844731136
+ .long 1071204076
+ .long 2878117321
+ .long 1019116513
+ .long 4028950528
+ .long 1071221842
+ .long 698911452
+ .long 1023265602
+ .long 69441536
+ .long 1071239641
+ .long 3253467847
+ .long 1020795075
+ .long 1676209920
+ .long 1071257471
+ .long 4272431167
+ .long 1022873982
+ .long 2408752384
+ .long 1071275334
+ .long 648519100
+ .long 1024385717
+ .long 151623680
+ .long 1071293231
+ .long 345257017
+ .long 1019561408
+ .long 1410154240
+ .long 1071311161
+ .long 197863993
+ .long 1023224207
+ .long 4131351552
+ .long 1071329125
+ .long 2620801789
+ .long 1024411169
+ .long 1999664384
+ .long 1071347125
+ .long 3952692616
+ .long 1024168086
+ .long 1617668864
+ .long 1071365160
+ .long 3019889809
+ .long 1021907692
+ .long 1032074240
+ .long 1071383231
+ .long 59469899
+ .long 1023656194
+ .long 2619492096
+ .long 1071401338
+ .long 1417526820
+ .long 1021457783
+ .long 202429440
+ .long 1071419483
+ .long 2927667935
+ .long 1019175447
+ .long 525044224
+ .long 1071437665
+ .long 38166811
+ .long 1023981879
+ .long 1779258880
+ .long 1071455885
+ .long 481252500
+ .long 1023310234
+ .long 2195673600
+ .long 1071474144
+ .long 3962395981
+ .long 1021339088
+ .long 44573696
+ .long 1071492443
+ .long 3936281395
+ .long 1023014829
+ .long 2226905344
+ .long 1071510781
+ .long 1515320476
+ .long 1024320623
+ .long 2800512512
+ .long 1071529160
+ .long 1225403697
+ .long 1021081846
+ .long 161113600
+ .long 1071547581
+ .long 3064809733
+ .long 1024173917
+ .long 1338410240
+ .long 1071566043
+ .long 2027604973
+ .long 1024362526
+ .long 522433280
+ .long 1071584548
+ .long 2055171723
+ .long 1023858825
+ .long 539595776
+ .long 1071603096
+ .long 3868820135
+ .long 1022936424
+ .long 4264017664
+ .long 1071621687
+ .long 3228065145
+ .long 1023479578
+ .long 1733924096
+ .long 1071640324
+ .long 3511934475
+ .long 1022496355
+ .long 108880384
+ .long 1071651839
+ .long 615880967
+ .long 1023519706
+ .long 3517856512
+ .long 1071661202
+ .long 3113108559
+ .long 1025190289
+ .long 4043153152
+ .long 1071670589
+ .long 1571836218
+ .long 1023106116
+ .long 3251299072
+ .long 1071680000
+ .long 3444076102
+ .long 1022187841
+ .long 2736921600
+ .long 1071689435
+ .long 272771483
+ .long 1025095280
+ .long 3897698560
+ .long 1071703633
+ .long 2075390188
+ .long 1022489022
+ .long 3209485056
+ .long 1071722652
+ .long 1438094065
+ .long 1021844944
+ .long 3781432064
+ .long 1071741774
+ .long 1675017145
+ .long 1024143828
+ .long 2684184064
+ .long 1071761003
+ .long 2259963753
+ .long 1024731393
+ .long 1840489728
+ .long 1071780342
+ .long 3372883597
+ .long 1023431408
+ .long 3764087808
+ .long 1071799794
+ .long 3307523102
+ .long 1024485788
+ .long 3006232320
+ .long 1071819364
+ .long 3088971966
+ .long 1025213251
+ .long 3374881280
+ .long 1071839055
+ .long 834437749
+ .long 1025236452
+ .long 797284864
+ .long 1071858872
+ .long 3122663941
+ .long 1025320473
+ .long 545765120
+ .long 1071878818
+ .long 826539625
+ .long 1022450955
+ .long 107562240
+ .long 1071898898
+ .long 339584600
+ .long 1022481255
+ .long 2123649024
+ .long 1071919116
+ .long 3912959833
+ .long 1024321009
+ .long 1562385664
+ .long 1071939478
+ .long 2846067230
+ .long 1023343981
+ .long 2963085824
+ .long 1071959988
+ .long 954548627
+ .long 1021475211
+ .long 3325550592
+ .long 1071980652
+ .long 3459651155
+ .long 1025305573
+ .long 775752448
+ .long 1072001476
+ .long 3582746667
+ .long 1023859460
+ .long 3238590720
+ .long 1072022464
+ .long 634636162
+ .long 1024472353
+ .long 2758801920
+ .long 1072043624
+ .long 3078216319
+ .long 1025304516
+ .long 1370319104
+ .long 1072064962
+ .long 2570569078
+ .long 1025099442
+ .long 2615805184
+ .long 1072086484
+ .long 3729933412
+ .long 1024605112
+ .long 3077336576
+ .long 1072108198
+ .long 1948916066
+ .long 1024781603
+ .long 1099528192
+ .long 1072130112
+ .long 3139143157
+ .long 1023729360
+ .long 1231903232
+ .long 1072152233
+ .long 1349513477
+ .long 1024737515
+ .long 1507504128
+ .long 1072174570
+ .long 3484516322
+ .long 1024000959
+ .long 2214659840
+ .long 1072197132
+ .long 2563820917
+ .long 1025225535
+ .long 1804739840
+ .long 1072219929
+ .long 760038746
+ .long 1024482855
+ .long 1413746688
+ .long 1072242971
+ .long 3401734714
+ .long 1025129838
+ .long 821409536
+ .long 1072266269
+ .long 3729772551
+ .long 1025484796
+ .long 3031825664
+ .long 1072289834
+ .long 122256749
+ .long 1024752594
+ .long 1710784256
+ .long 1072313680
+ .long 1518205483
+ .long 1024724809
+ .long 3025265152
+ .long 1072337819
+ .long 409951989
+ .long 1022835555
+ .long 287769088
+ .long 1072362267
+ .long 800355594
+ .long 1022484850
+ .long 198179840
+ .long 1072387038
+ .long 3502926213
+ .long 1024209373
+ .long 1909130496
+ .long 1072412149
+ .long 3064694319
+ .long 1025380823
+ .long 1941732096
+ .long 1072437619
+ .long 4112930390
+ .long 1024294679
+ .long 3492010496
+ .long 1072463467
+ .long 2684918107
+ .long 1023220233
+ .long 81959680
+ .long 1072489716
+ .long 220021366
+ .long 1020635131
+ .long 2297837056
+ .long 1072516387
+ .long 4027683826
+ .long 1021041185
+ .long 270404096
+ .long 1072543508
+ .long 2012766065
+ .long 1021780753
+ .long 3667376896
+ .long 1072571105
+ .long 2727981522
+ .long 1023009874
+ .long 330400256
+ .long 1072599212
+ .long 2940017003
+ .long 1025393439
+ .long 1119293952
+ .long 1072627861
+ .long 1608550416
+ .long 1022675612
+ .long 3536155904
+ .long 1072657091
+ .long 349665778
+ .long 1025156751
+ .long 3078046720
+ .long 1072686946
+ .long 2016159996
+ .long 1022193169
+ .long 455228416
+ .long 1072705361
+ .long 1908539328
+ .long 1026126332
+ .long 1871505664
+ .long 1072720988
+ .long 2784700894
+ .long 1025922277
+ .long 1630994432
+ .long 1072737010
+ .long 361107678
+ .long 1022887244
+ .long 2084558336
+ .long 1072753462
+ .long 2642784509
+ .long 1072689083
+ .long 1514442531
+ .long 1072688953
+ .long 333108933
+ .long 1072688821
+ .long 3392112024
+ .long 1072688686
+ .long 2099852862
+ .long 1072688550
+ .long 749609004
+ .long 1072688412
+ .long 3634632596
+ .long 1072688271
+ .long 2163248461
+ .long 1072688129
+ .long 628657846
+ .long 1072687985
+ .long 3324036511
+ .long 1072687838
+ .long 1657632815
+ .long 1072687690
+ .long 4217538760
+ .long 1072687539
+ .long 2411951597
+ .long 1072687387
+ .long 533944872
+ .long 1072687233
+ .long 2876566508
+ .long 1072687076
+ .long 847936891
+ .long 1072686918
+ .long 3036019913
+ .long 1072686757
+ .long 848884575
+ .long 1072686595
+ .long 2874443326
+ .long 1072686430
+ .long 520713666
+ .long 1072686264
+ .long 2375556481
+ .long 1072686095
+ .long 4141904948
+ .long 1072685924
+ .long 1522666382
+ .long 1072685752
+ .long 3105624104
+ .long 1072685577
+ .long 298666327
+ .long 1072685401
+ .long 1689524500
+ .long 1072685222
+ .long 2981002200
+ .long 1072685041
+ .long 4170844284
+ .long 1072684858
+ .long 961802263
+ .long 1072684674
+ .long 1941503454
+ .long 1072684487
+ .long 2812647170
+ .long 1072684298
+ .long 3572873869
+ .long 1072684107
+ .long 4219797823
+ .long 1072683914
+ .long 456039788
+ .long 1072683720
+ .long 869096151
+ .long 1072683523
+ .long 1161535119
+ .long 1072683324
+ .long 1330865866
+ .long 1072683123
+ .long 1374571204
+ .long 1072682920
+ .long 1290107538
+ .long 1072682715
+ .long 1074904836
+ .long 1072682508
+ .long 726366587
+ .long 1072682299
+ .long 241869763
+ .long 1072682088
+ .long 3913732079
+ .long 1072681874
+ .long 3149342765
+ .long 1072681659
+ .long 2240966306
+ .long 1072681442
+ .long 1185873216
+ .long 1072681223
+ .long 4276274591
+ .long 1072681001
+ .long 2919452883
+ .long 1072680778
+ .long 1407565635
+ .long 1072680553
+ .long 4032743551
+ .long 1072680325
+ .long 2202188565
+ .long 1072680096
+ .long 207977577
+ .long 1072679865
+ .long 2342160518
+ .long 1072679631
+ .long 11858423
+ .long 1072679396
+ .long 1804034453
+ .long 1072679158
+ .long 3420722787
+ .long 1072678918
+ .long 563930456
+ .long 1072678677
+ .long 1820539192
+ .long 1072678433
+ .long 2892501606
+ .long 1072678187
+ .long 3776710320
+ .long 1072677939
+ .long 175063337
+ .long 1072677690
+ .long 674333171
+ .long 1072677438
+ .long 976363026
+ .long 1072677184
+ .long 1077935934
+ .long 1072676928
+ .long 1921075490
+ .long 1072676540
+ .long 881493302
+ .long 1072676016
+ .long 3275752439
+ .long 1072675483
+ .long 486855588
+ .long 1072674943
+ .long 1077229111
+ .long 1072674394
+ .long 723950308
+ .long 1072673837
+ .long 3693582199
+ .long 1072673271
+ .long 1367335316
+ .long 1072672698
+ .long 2305837020
+ .long 1072672116
+ .long 2184358641
+ .long 1072671526
+ .long 972682840
+ .long 1072670928
+ .long 2935101762
+ .long 1072670321
+ .long 3745513263
+ .long 1072669706
+ .long 3372320886
+ .long 1072669083
+ .long 1783464620
+ .long 1072668452
+ .long 3241386215
+ .long 1072667812
+ .long 3418125284
+ .long 1072667164
+ .long 2280219148
+ .long 1072666508
+ .long 4088700758
+ .long 1072665843
+ .long 219227400
+ .long 1072665171
+ .long 3521816918
+ .long 1072664489
+ .long 1076205279
+ .long 1072663800
+ .long 1436484616
+ .long 1072663102
+ .long 271362610
+ .long 1072662396
+ .long 1838996688
+ .long 1072661681
+ .long 1807122518
+ .long 1072660958
+ .long 137953542
+ .long 1072660227
+ .long 1088178584
+ .long 1072659487
+ .long 324057537
+ .long 1072658739
+ .long 2101288076
+ .long 1072657982
+ .long 2085133974
+ .long 1072657217
+ .long 235324451
+ .long 1072656444
+ .long 806051592
+ .long 1072655662
+ .long 3756033140
+ .long 1072654871
+ .long 453542543
+ .long 1072654073
+ .long 3741177327
+ .long 1072653265
+ .long 691216109
+ .long 1072652450
+ .long 4145223372
+ .long 1072651625
+ .long 1174439091
+ .long 1072650793
+ .long 324416139
+ .long 1072649952
+ .long 1550246310
+ .long 1072649102
+ .long 511524674
+ .long 1072648244
+ .long 1457248482
+ .long 1072647377
+ .long 45944955
+ .long 1072646502
+ .long 525537397
+ .long 1072645618
+ .long 2848440188
+ .long 1072644725
+ .long 2671555633
+ .long 1072643824
+ .long 4241172637
+ .long 1072642914
+ .long 3213094278
+ .long 1072641996
+ .long 3832503688
+ .long 1072641069
+ .long 1754091534
+ .long 1072640134
+ .long 1221921804
+ .long 1072639190
+ .long 2184526489
+ .long 1072638237
+ .long 294902089
+ .long 1072637276
+ .long 4090375270
+ .long 1072636305
+ .long 632860906
+ .long 1072635327
+ .long 2753498702
+ .long 1072634339
+ .long 1808009252
+ .long 1072633343
+ .long 2036428672
+ .long 1072632338
+ .long 3383235626
+ .long 1072631324
+ .long 1497347484
+ .long 1072630302
+ .long 617018317
+ .long 1072629271
+ .long 684933058
+ .long 1072628231
+ .long 1643170798
+ .long 1072627182
+ .long 3011066360
+ .long 1072625592
+ .long 957158713
+ .long 1072623442
+ .long 1390907941
+ .long 1072621256
+ .long 3819155270
+ .long 1072619034
+ .long 3443571196
+ .long 1072616777
+ .long 4045412458
+ .long 1072614484
+ .long 805503923
+ .long 1072612156
+ .long 1778922015
+ .long 1072609791
+ .long 2125033665
+ .long 1072607390
+ .long 1287203863
+ .long 1072604953
+ .long 2992629568
+ .long 1072602479
+ .long 2367267127
+ .long 1072599969
+ .long 3115526047
+ .long 1072597422
+ .long 340219539
+ .long 1072594839
+ .long 2017215719
+ .long 1072592218
+ .long 3225443424
+ .long 1072589560
+ .long 3326565673
+ .long 1072586865
+ .long 1669811211
+ .long 1072584133
+ .long 1886735022
+ .long 1072581363
+ .long 3301071171
+ .long 1072578555
+ .long 928514283
+ .long 1072575710
+ .long 2656364059
+ .long 1072572826
+ .long 3473490507
+ .long 1072569904
+ .long 2649965606
+ .long 1072566944
+ .long 3736819052
+ .long 1072563945
+ .long 1680885175
+ .long 1072560908
+ .long 4413771
+ .long 1072557832
+ .long 2214869753
+ .long 1072554716
+ .long 3214725184
+ .long 1072551561
+ .long 2186079903
+ .long 1072548367
+ .long 2590372131
+ .long 1072545133
+ .long 3578146079
+ .long 1072541859
+ .long 4283712755
+ .long 1072538545
+ .long 3824834510
+ .long 1072535191
+ .long 1302400298
+ .long 1072531797
+ .long 95058636
+ .long 1072528362
+ .long 3563906063
+ .long 1072524885
+ .long 2167230730
+ .long 1072521368
+ .long 3524918334
+ .long 1072517809
+ .long 2353304918
+ .long 1072514209
+ .long 1939625839
+ .long 1072510567
+ .long 1256714581
+ .long 1072506883
+ .long 3552525848
+ .long 1072503156
+ .long 3464809522
+ .long 1072499387
+ .long 4200542593
+ .long 1072495575
+ .long 355609124
+ .long 1072491721
+ .long 3684139099
+ .long 1072487822
+ .long 148355918
+ .long 1072483881
+ .long 1457689242
+ .long 1072479895
+ .long 2118591596
+ .long 1072475865
+ .long 908848089
+ .long 1072471791
+ .long 877032689
+ .long 1072467672
+ .long 752012304
+ .long 1072463508
+ .long 3532301749
+ .long 1072459298
+ .long 3600563221
+ .long 1072455043
+ .long 3902857084
+ .long 1072450742
+ .long 3063101036
+ .long 1072446395
+ .long 3972344374
+ .long 1072442001
+ .long 903183549
+ .long 1072437561
+ .long 983892938
+ .long 1072433073
+ .long 2722858568
+ .long 1072428537
+ .long 302790515
+ .long 1072423954
+ .long 759811057
+ .long 1072419322
+ .long 2507809922
+ .long 1072414641
+ .long 2388408813
+ .long 1072407528
+ .long 2084492942
+ .long 1072397870
+ .long 2435703301
+ .long 1072388010
+ .long 1935433360
+ .long 1072377945
+ .long 2742047290
+ .long 1072367671
+ .long 2053284205
+ .long 1072357185
+ .long 657783367
+ .long 1072346483
+ .long 2893664841
+ .long 1072335560
+ .long 3718906405
+ .long 1072324413
+ .long 1547896303
+ .long 1072313038
+ .long 2494058440
+ .long 1072301429
+ .long 3133238742
+ .long 1072289582
+ .long 3327000086
+ .long 1072277492
+ .long 1860667274
+ .long 1072265154
+ .long 665340747
+ .long 1072252562
+ .long 443347841
+ .long 1072239710
+ .long 581282618
+ .long 1072226592
+ .long 3349780465
+ .long 1072213201
+ .long 914217606
+ .long 1072199532
+ .long 989797661
+ .long 1072185576
+ .long 945436416
+ .long 1072171326
+ .long 549291300
+ .long 1072156774
+ .long 1814636389
+ .long 1072141911
+ .long 239092858
+ .long 1072126729
+ .long 1794680724
+ .long 1072111217
+ .long 1241534678
+ .long 1072095366
+ .long 3366566214
+ .long 1072079164
+ .long 1244090828
+ .long 1072062601
+ .long 1708448120
+ .long 1072045663
+ .long 3544260650
+ .long 1072028337
+ .long 1402741403
+ .long 1072010610
+ .long 2551936888
+ .long 1071992465
+ .long 617669739
+ .long 1071973887
+ .long 794002186
+ .long 1071954857
+ .long 2021237693
+ .long 1071935356
+ .long 540450384
+ .long 1071915364
+ .long 1920555537
+ .long 1071894857
+ .long 2879585206
+ .long 1071873811
+ .long 3000237455
+ .long 1071852199
+ .long 3352974346
+ .long 1071829991
+ .long 569629937
+ .long 1071807155
+ .long 2077237208
+ .long 1071783653
+ .long 2284891805
+ .long 1071759446
+ .long 1226651784
+ .long 1071734489
+ .long 1102047405
+ .long 1071708731
+ .long 2009896384
+ .long 1071682115
+ .long 927419082
+ .long 1071654577
+ .long 85010366
+ .long 1071607413
+ .long 696431025
+ .long 1071548180
+ .long 2611410541
+ .long 1071486585
+ .long 2612593658
+ .long 1071422396
+ .long 3548155306
+ .long 1071355336
+ .long 3887997484
+ .long 1071285073
+ .long 244854763
+ .long 1071211202
+ .long 4214445648
+ .long 1071133216
+ .long 2303966727
+ .long 1071050478
+ .long 3991040013
+ .long 1070962152
+ .long 3126952278
+ .long 1070867118
+ .long 1817448378
+ .long 1070763804
+ .long 1793814864
+ .long 1070649884
+ .long 3507224072
+ .long 1070447193
+ .long 4027609105
+ .long 1070148772
+ .long 577507993
+ .long 1069779414
+ .long 2310232419
+ .long 1068931829
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 0
+ .long 0
+ .long 4294950912
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 2147483584
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .type static_const_table,@object
+ .size static_const_table,6096
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_atan2.S b/libm/x86/e_atan2.S
new file mode 100644
index 0000000..1efdf65
--- /dev/null
+++ b/libm/x86/e_atan2.S
@@ -0,0 +1,1221 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+//
+//1. The method is based on the relationship of atan2(Y,X) to atan(|Y/X|)
+// as follows.
+// / sign(Y) atan(|Y/X|) if X > 0
+// atan2(Y,X) =
+// \ sign(Y)*pi - sign(Y)*atan(|Y/X|) if X < 0
+//
+// Thus, atan2(Y,X) is of the form atan2(Y,X) = PI + sgn*atan(|Y/X|)
+// where PI and sgn can be determined by the four possible combinations of
+// of the pair (sign(X),sign(Y)). We concentrate on the numerical method
+// for atan(|Y/X|).
+//
+//2. For |Y/X| < 2^(-64), atan(|Y/X|) ~=~ |Y/X|. Hence, atan2(Y,X) is Y/X
+// if X > 0, and sign(Y)*pi otherwise.
+//3. For |Y/X| >= 2^(65), atan(|Y/X|) ~=~ pi/2. Hence atan2(Y,X) is sign(Y)pi/2.
+//4. For 2^(-64) <= |Y/X| < 2^(-5), atan(|Y/X|) is approximated by a polynomial
+// of the form Z + Z*E*polynomial(E), where Z = |Y/X| and E = Z*Z.
+//5. For |Y/X| > 2^(5), atan(|Y/X|) = pi/2 + atan(-|X/Y|), and atan(-|X/Y|) is
+// calculated using the polynomial in 4 above.
+//6. For 2^(-5) <= |Y/X| <= 2^(5), we employ a table lookup method. First,
+// we obtain B = 2^k * 1.b1 b2 b3 b4 = 2^k * (1+k/16) that approximate
+// |Y/X| to approximately 5 significant bits. Hence, atan(|Y/X|) is
+//
+// atan(|Y/X|) = atan(B) + atan(Z), where Z = (|Y|-B|X|)/(|X|+B|Y|).
+// ~=~ tau + Z + Z*E*polynomial(E), where E = Z*Z.
+//
+// B has the range from 2^(-6)*(1+14/16) to 2^5 = 2^(5)*(1+0/16), totally
+// 163 possible values. These values are calculated beforehand and stored
+// in a table. The polynomial is the one used in 4.
+//
+// Special cases:
+// atan2(+-0, +0) = +-0
+// atan2(+-0, -0) = +-pi
+// atan2(+-0, x) = +-0, for x > 0, and +-pi, for x < 0
+// atan2(y, +-0) = +pi/2 for y > 0, and -pi/2 for y < 0
+// atan2(+-y, +INF) = +-0, for finite y > 0
+// atan2(+-y, -INF) = +-pi, for finite y > 0
+// atan2(+-INF, x) = +-pi/2, for finite x
+// atan2(+-INF, +INF) = +-pi/4
+// atan2(+-INF, -INF) = +-3*pi/4
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin atan2
+ENTRY(atan2)
+# parameter 1: 8 + %ebp
+# parameter 2: 16 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 64(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 136(%esp), %xmm1
+ movsd 128(%esp), %xmm0
+ pextrw $3, %xmm0, %eax
+ movq %xmm0, 8(%esp)
+ andl $32752, %eax
+ movq %xmm1, 16(%esp)
+ subl $14448, %eax
+ cmpl $3840, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ subl $14448, %eax
+ cmpl $3840, %eax
+ ja .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ unpcklpd %xmm1, %xmm0
+ xorpd %xmm5, %xmm5
+ xorpd %xmm3, %xmm3
+ movl $2048, %eax
+ pinsrw $3, %eax, %xmm5
+ paddw %xmm1, %xmm5
+ psrlq $29, %xmm5
+ rcpss %xmm5, %xmm3
+ xorpd %xmm4, %xmm4
+ movl $14336, %ecx
+ pinsrw $3, %ecx, %xmm4
+ psllq $29, %xmm3
+ paddw %xmm4, %xmm3
+ mulsd %xmm0, %xmm3
+ xorpd %xmm2, %xmm2
+ xorpd %xmm6, %xmm6
+ xorpd %xmm7, %xmm7
+ movl $32768, %eax
+ pinsrw $2, %eax, %xmm6
+ movl $32767, %ecx
+ pinsrw $3, %ecx, %xmm7
+ paddd %xmm6, %xmm3
+ andpd %xmm7, %xmm3
+ movapd %xmm3, %xmm5
+ pextrw $3, %xmm3, %eax
+ movl $16448, %ecx
+ pinsrw $3, %ecx, %xmm2
+ minsd %xmm2, %xmm3
+ movmskpd %xmm0, %edx
+ psllq $1, %xmm0
+ psrlq $1, %xmm0
+ cmpsd $2, %xmm2, %xmm5
+ psllq $1, %xmm1
+ psrlq $1, %xmm1
+ movapd %xmm1, %xmm6
+ movapd %xmm1, %xmm7
+ movapd %xmm0, %xmm2
+ movl $0, %ecx
+ pinsrw $0, %ecx, %xmm6
+ subsd %xmm6, %xmm7
+ movapd %xmm0, %xmm4
+ mulsd %xmm3, %xmm6
+ mulsd %xmm3, %xmm4
+ mulsd %xmm3, %xmm7
+ andpd %xmm5, %xmm0
+ subsd %xmm6, %xmm0
+ andpd %xmm5, %xmm1
+ addsd %xmm1, %xmm4
+ subsd %xmm7, %xmm0
+ andl $32752, %eax
+ subl $16286, %eax
+ cmpl $1121, %eax
+ ja .L_2TAG_PACKET_3.0.2
+ divsd %xmm4, %xmm0
+ pextrw $3, %xmm3, %ecx
+ movsd 2944(%ebx), %xmm2
+ movsd 2960(%ebx), %xmm3
+ pextrw $0, %xmm5, %eax
+ addl %edx, %edx
+ movapd 2688(%ebx,%edx,8), %xmm6
+ movapd 2752(%ebx,%edx,8), %xmm1
+ subl $16286, %ecx
+ notl %eax
+ andl $1, %eax
+ addl %eax, %ecx
+ addl %ecx, %ecx
+ movapd (%ebx,%ecx,8), %xmm5
+ xorpd %xmm1, %xmm5
+ addpd %xmm6, %xmm5
+ movapd %xmm5, %xmm6
+ unpckhpd %xmm5, %xmm5
+ xorpd %xmm0, %xmm1
+ movapd %xmm1, %xmm4
+ mulsd %xmm0, %xmm0
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm3
+ addsd %xmm6, %xmm1
+ subsd %xmm1, %xmm6
+ addsd %xmm4, %xmm6
+ addsd 2952(%ebx), %xmm2
+ mulsd %xmm0, %xmm3
+ mulsd %xmm0, %xmm4
+ addsd %xmm5, %xmm6
+ mulsd %xmm4, %xmm2
+ addsd 2968(%ebx), %xmm3
+ mulsd %xmm3, %xmm2
+ addsd %xmm6, %xmm2
+ addsd %xmm2, %xmm1
+ movsd %xmm1, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_3.0.2:
+ addl $942, %eax
+ cmpl $942, %eax
+ ja .L_2TAG_PACKET_5.0.2
+ xorpd %xmm4, %xmm4
+ movl $16368, %ecx
+ pinsrw $3, %ecx, %xmm4
+ divsd %xmm1, %xmm4
+ addl %edx, %edx
+ movapd 2752(%ebx,%edx,8), %xmm6
+ unpcklpd %xmm3, %xmm3
+ xorpd %xmm6, %xmm0
+ xorpd %xmm6, %xmm2
+ xorpd %xmm6, %xmm3
+ movapd 2816(%ebx,%edx,8), %xmm7
+ movsd 2944(%ebx), %xmm1
+ movsd 2960(%ebx), %xmm5
+ andpd 2880(%ebx,%edx,8), %xmm3
+ mulsd %xmm4, %xmm2
+ mulsd %xmm4, %xmm0
+ movapd %xmm2, %xmm6
+ mulsd %xmm2, %xmm2
+ mulsd %xmm2, %xmm1
+ addsd %xmm2, %xmm5
+ mulsd %xmm2, %xmm6
+ addsd 2952(%ebx), %xmm1
+ mulsd %xmm2, %xmm5
+ addsd %xmm0, %xmm7
+ addpd %xmm3, %xmm7
+ mulsd %xmm6, %xmm1
+ addsd 2968(%ebx), %xmm5
+ mulsd %xmm1, %xmm5
+ addsd %xmm7, %xmm5
+ unpckhpd %xmm7, %xmm7
+ addsd %xmm7, %xmm5
+ movsd %xmm5, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ movsd 16(%esp), %xmm1
+ movsd 8(%esp), %xmm0
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl %eax, %ecx
+ jg .L_2TAG_PACKET_6.0.2
+ pextrw $3, %xmm1, %ecx
+ cmpl $32767, %ecx
+ jg .L_2TAG_PACKET_7.0.2
+ divsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_7.0.2:
+ andpd 2672(%ebx), %xmm0
+ movsd 2640(%ebx), %xmm2
+ xorpd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_6.0.2:
+ andpd 2672(%ebx), %xmm0
+ movsd 2624(%ebx), %xmm2
+ xorpd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_0.0.2:
+.L_2TAG_PACKET_1.0.2:
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_8.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_9.0.2
+ movsd 2992(%ebx), %xmm3
+ movl $1024, %edx
+ movsd 2976(%ebx), %xmm4
+ xorpd %xmm6, %xmm6
+ movsd 3008(%ebx), %xmm7
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_10.0.2
+.L_2TAG_PACKET_11.0.2:
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_12.0.2
+.L_2TAG_PACKET_13.0.2:
+ addl %ecx, %edx
+ subl %eax, %edx
+ cmpl $2048, %edx
+ ja .L_2TAG_PACKET_5.0.2
+ addl $15344, %edx
+ pinsrw $3, %edx, %xmm6
+ andpd %xmm4, %xmm0
+ andpd %xmm4, %xmm1
+ orpd %xmm6, %xmm0
+ orpd %xmm7, %xmm1
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_10.0.2:
+ subl $880, %edx
+ mulsd %xmm3, %xmm0
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_14.0.2
+ jmp .L_2TAG_PACKET_11.0.2
+.L_2TAG_PACKET_12.0.2:
+ addl $880, %edx
+ mulsd %xmm3, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_15.0.2
+ jmp .L_2TAG_PACKET_13.0.2
+.L_2TAG_PACKET_8.0.2:
+ movd %xmm0, %edx
+ movapd %xmm0, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $1048575, %ecx
+ orl %edx, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_16.0.2
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ cmpl $32752, %eax
+ jae .L_2TAG_PACKET_17.0.2
+ movapd 2624(%ebx), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+.L_2TAG_PACKET_18.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_16.0.2:
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_17.0.2:
+ movd %xmm1, %eax
+ movapd %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ movl $-2147483648, %edx
+ andl %ecx, %edx
+ andl $1048575, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_19.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_20.0.2
+ movapd 2656(%ebx), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_19.0.2:
+ movapd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_20.0.2:
+ movapd 2656(%ebx), %xmm5
+ movapd 2624(%ebx), %xmm6
+ addpd %xmm6, %xmm5
+ pshufd $238, %xmm5, %xmm6
+ addpd %xmm6, %xmm5
+ orpd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_9.0.2:
+ movd %xmm1, %eax
+ movapd %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ movl $-2147483648, %edx
+ andl %ecx, %edx
+ andl $1048575, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_19.0.2
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_21.0.2
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_21.0.2:
+ movapd 2640(%ebx), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_14.0.2:
+ pextrw $3, %xmm1, %edx
+ andl $32768, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_22.0.2
+ movapd 2640(%ebx), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ comisd %xmm0, %xmm1
+ orpd %xmm5, %xmm0
+ jne .L_2TAG_PACKET_23.0.2
+.L_2TAG_PACKET_24.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_23.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_22.0.2:
+ comisd %xmm0, %xmm1
+ jne .L_2TAG_PACKET_23.0.2
+ je .L_2TAG_PACKET_24.0.2
+.L_2TAG_PACKET_15.0.2:
+ movapd 2624(%ebx), %xmm5
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+.L_2TAG_PACKET_4.0.2:
+ movl 64(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(atan2)
+# -- End atan2
+
+# Start file scope ASM
+ALIAS_SYMBOL(atan2l, atan2);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 3390881280
+ .long 1067318733
+ .long 1411116779
+ .long 1018950063
+ .long 2985987840
+ .long 1067384211
+ .long 2088903695
+ .long 1018086027
+ .long 3148445184
+ .long 1067449685
+ .long 2044163806
+ .long 1017271335
+ .long 3667629184
+ .long 1067515494
+ .long 2353092775
+ .long 1019967309
+ .long 1546568832
+ .long 1067580954
+ .long 611991315
+ .long 1017602584
+ .long 3815996800
+ .long 1067646404
+ .long 466038598
+ .long 1019686426
+ .long 4050241920
+ .long 1067711845
+ .long 3265026328
+ .long 1019626952
+ .long 120454912
+ .long 1067777277
+ .long 1542207696
+ .long 1020155608
+ .long 2784639744
+ .long 1067842697
+ .long 3883834623
+ .long 1018602870
+ .long 1328010624
+ .long 1067908107
+ .long 1791097456
+ .long 1019053126
+ .long 2217794048
+ .long 1067973505
+ .long 551619938
+ .long 1018494194
+ .long 3333520000
+ .long 1068038891
+ .long 2390331823
+ .long 1019033022
+ .long 2557052032
+ .long 1068104265
+ .long 2423976108
+ .long 1019728674
+ .long 2067649536
+ .long 1068169626
+ .long 3757397745
+ .long 1018672362
+ .long 4047094784
+ .long 1068234973
+ .long 481613184
+ .long 1019275104
+ .long 2089853184
+ .long 1068300307
+ .long 1733914374
+ .long 1020124677
+ .long 2678003840
+ .long 1068365626
+ .long 1373600282
+ .long 1013935474
+ .long 3706496128
+ .long 1068430930
+ .long 1000610902
+ .long 1019673285
+ .long 3073179008
+ .long 1068496219
+ .long 1497143008
+ .long 1019900342
+ .long 2803716736
+ .long 1068562846
+ .long 1476677416
+ .long 1019444094
+ .long 3204984128
+ .long 1068628077
+ .long 1192335905
+ .long 1018748628
+ .long 831146624
+ .long 1068693273
+ .long 2733586224
+ .long 1018823295
+ .long 243029376
+ .long 1068758431
+ .long 950106081
+ .long 1019046675
+ .long 1735561920
+ .long 1068823549
+ .long 3546440856
+ .long 1020104712
+ .long 1339217792
+ .long 1068888626
+ .long 3028812387
+ .long 1019818321
+ .long 3706342144
+ .long 1068953659
+ .long 3814564029
+ .long 1017763871
+ .long 637726976
+ .long 1069018648
+ .long 3584007699
+ .long 1017976868
+ .long 1148779264
+ .long 1069083589
+ .long 2282532133
+ .long 1019483954
+ .long 1406131392
+ .long 1069148481
+ .long 1547359113
+ .long 1019786342
+ .long 1908875904
+ .long 1069213322
+ .long 1315508410
+ .long 1020009473
+ .long 3194947520
+ .long 1069278110
+ .long 3845393201
+ .long 1015803761
+ .long 1547487744
+ .long 1069342844
+ .long 3863107865
+ .long 1019810104
+ .long 1881061952
+ .long 1069407521
+ .long 4288343548
+ .long 1019687581
+ .long 563086336
+ .long 1069472140
+ .long 2582230241
+ .long 1020099350
+ .long 2594975552
+ .long 1069536698
+ .long 2306443764
+ .long 1019667244
+ .long 3438545024
+ .long 1069606573
+ .long 957455549
+ .long 1015587735
+ .long 4211357472
+ .long 1069670906
+ .long 2611778754
+ .long 1017877214
+ .long 3002835424
+ .long 1069735101
+ .long 235580458
+ .long 1020211685
+ .long 3905315424
+ .long 1069799150
+ .long 3630647617
+ .long 1018736849
+ .long 2849656576
+ .long 1069863047
+ .long 2412165062
+ .long 1019693004
+ .long 507429472
+ .long 1069926785
+ .long 1397750723
+ .long 1018412717
+ .long 2307470272
+ .long 1069990356
+ .long 1796470904
+ .long 1019796181
+ .long 1271814912
+ .long 1070053755
+ .long 189761565
+ .long 1016149115
+ .long 3800538144
+ .long 1070116974
+ .long 2524871582
+ .long 1018263353
+ .long 3916203552
+ .long 1070180008
+ .long 127848658
+ .long 1017672664
+ .long 457192032
+ .long 1070242851
+ .long 4020400938
+ .long 1019823010
+ .long 1385324704
+ .long 1070305495
+ .long 564511179
+ .long 1016079094
+ .long 2322869856
+ .long 1070367935
+ .long 2347103319
+ .long 1018927760
+ .long 3743438624
+ .long 1070430165
+ .long 877973862
+ .long 1019638162
+ .long 2392255552
+ .long 1070492180
+ .long 2432782267
+ .long 1018872629
+ .long 4180443328
+ .long 1070553973
+ .long 3102990015
+ .long 1020093101
+ .long 2547540832
+ .long 1070636485
+ .long 3877738253
+ .long 1017300424
+ .long 2735468912
+ .long 1070697461
+ .long 2446470256
+ .long 1019235378
+ .long 542633792
+ .long 1070757943
+ .long 583606328
+ .long 1018624131
+ .long 923265984
+ .long 1070817911
+ .long 1793926708
+ .long 1019714161
+ .long 918728448
+ .long 1070877348
+ .long 3726463586
+ .long 1019433296
+ .long 2572275008
+ .long 1070936237
+ .long 1845354238
+ .long 1019459238
+ .long 50974688
+ .long 1070994564
+ .long 983808064
+ .long 1016685418
+ .long 1105518320
+ .long 1071052313
+ .long 2357496692
+ .long 1015139882
+ .long 1264825328
+ .long 1071109472
+ .long 2244129354
+ .long 1019046344
+ .long 961157920
+ .long 1071166029
+ .long 3124185339
+ .long 1018541776
+ .long 1162701584
+ .long 1071221973
+ .long 1279780948
+ .long 1019268918
+ .long 3284935664
+ .long 1071277294
+ .long 2670033472
+ .long 1019833744
+ .long 497441888
+ .long 1071331985
+ .long 1032737410
+ .long 1019795212
+ .long 3377383904
+ .long 1071386036
+ .long 2356897182
+ .long 1020205553
+ .long 1126962000
+ .long 1071439443
+ .long 3723724586
+ .long 1015212418
+ .long 90291008
+ .long 1071492199
+ .long 4178672431
+ .long 1020186971
+ .long 190059536
+ .long 1071595741
+ .long 1763589807
+ .long 1019162163
+ .long 2497392840
+ .long 1071670654
+ .long 3036997041
+ .long 1020204325
+ .long 2616971944
+ .long 1071719773
+ .long 300151069
+ .long 1017041957
+ .long 2883518128
+ .long 1071767563
+ .long 2203981414
+ .long 1019190108
+ .long 1496354352
+ .long 1071814030
+ .long 332287966
+ .long 1016846435
+ .long 483276728
+ .long 1071859184
+ .long 653845024
+ .long 1018830914
+ .long 3097401072
+ .long 1071903039
+ .long 1514746408
+ .long 1019278972
+ .long 2737217248
+ .long 1071945615
+ .long 1358845067
+ .long 1017268275
+ .long 2072577560
+ .long 1071986933
+ .long 3041024735
+ .long 1019929672
+ .long 2266405656
+ .long 1072027017
+ .long 1271261130
+ .long 1012925070
+ .long 958652544
+ .long 1072065894
+ .long 2158017058
+ .long 1019955372
+ .long 3312993840
+ .long 1072103591
+ .long 765809169
+ .long 1019114443
+ .long 3177001304
+ .long 1072140139
+ .long 144180084
+ .long 1019822186
+ .long 3071642184
+ .long 1072175568
+ .long 4004602424
+ .long 1019420740
+ .long 4283953648
+ .long 1072209909
+ .long 1511950430
+ .long 1020176966
+ .long 1413754136
+ .long 1072243195
+ .long 856972295
+ .long 1015129638
+ .long 4073202944
+ .long 1072306725
+ .long 4068194804
+ .long 1019714860
+ .long 946117760
+ .long 1072366415
+ .long 694980733
+ .long 1020150135
+ .long 3980632032
+ .long 1072422512
+ .long 1313251280
+ .long 1019948709
+ .long 1468297112
+ .long 1072475260
+ .long 330111143
+ .long 1019809198
+ .long 3478063816
+ .long 1072524887
+ .long 2930067044
+ .long 1017784081
+ .long 1153979856
+ .long 1072571613
+ .long 2225786102
+ .long 1017634481
+ .long 2089828808
+ .long 1072615641
+ .long 474621367
+ .long 1017043414
+ .long 3531732632
+ .long 1072657163
+ .long 2276396220
+ .long 1018757240
+ .long 775214612
+ .long 1072694803
+ .long 3209744818
+ .long 1019963015
+ .long 662307284
+ .long 1072713319
+ .long 1381696763
+ .long 1019763781
+ .long 1192776652
+ .long 1072730830
+ .long 3017932994
+ .long 1015179769
+ .long 744202396
+ .long 1072747407
+ .long 2073854034
+ .long 1019512292
+ .long 8337908
+ .long 1072763115
+ .long 16004448
+ .long 1019599514
+ .long 3589868768
+ .long 1072778013
+ .long 1374369804
+ .long 1018019237
+ .long 121647320
+ .long 1072792159
+ .long 128481634
+ .long 1018115438
+ .long 2464923204
+ .long 1072805601
+ .long 1787331214
+ .long 1016798022
+ .long 4093304372
+ .long 1072830562
+ .long 3306868969
+ .long 1019384078
+ .long 1436891684
+ .long 1072853231
+ .long 676347266
+ .long 1017302183
+ .long 1104571840
+ .long 1072873890
+ .long 2870400285
+ .long 1019938149
+ .long 2037009832
+ .long 1072892781
+ .long 2956702105
+ .long 1016472908
+ .long 3139037960
+ .long 1072910111
+ .long 916057147
+ .long 1018364335
+ .long 1826698064
+ .long 1072926058
+ .long 2171961098
+ .long 1019669816
+ .long 1353941060
+ .long 1072940774
+ .long 1722928782
+ .long 1019926215
+ .long 1803191644
+ .long 1072954391
+ .long 1547878639
+ .long 1020259262
+ .long 1092591296
+ .long 1072967024
+ .long 3070107923
+ .long 1018320401
+ .long 2205372832
+ .long 1072978772
+ .long 787328196
+ .long 1014621351
+ .long 1291577100
+ .long 1072989723
+ .long 2964757301
+ .long 1020242528
+ .long 4234512804
+ .long 1072999952
+ .long 3136030038
+ .long 1017522144
+ .long 3248069132
+ .long 1073009528
+ .long 1506192355
+ .long 1018050472
+ .long 3932628500
+ .long 1073018509
+ .long 1045823554
+ .long 1019946655
+ .long 4195697848
+ .long 1073026948
+ .long 233443322
+ .long 1018917447
+ .long 2501811452
+ .long 1073034892
+ .long 901427976
+ .long 1017333852
+ .long 866379428
+ .long 1073049455
+ .long 2437443742
+ .long 1019678792
+ .long 1376865888
+ .long 1073062480
+ .long 3365790232
+ .long 1014547152
+ .long 3290094268
+ .long 1073074195
+ .long 3898947415
+ .long 1018683566
+ .long 354764884
+ .long 1073084787
+ .long 3854322404
+ .long 1019662058
+ .long 3332975496
+ .long 1073094406
+ .long 3171701655
+ .long 1017830922
+ .long 1141460088
+ .long 1073103181
+ .long 3946082701
+ .long 1020032019
+ .long 745761284
+ .long 1073111216
+ .long 1347210591
+ .long 1019106121
+ .long 1673304508
+ .long 1073118600
+ .long 1760606642
+ .long 1017324577
+ .long 983388240
+ .long 1073125409
+ .long 3740651204
+ .long 1019514104
+ .long 3895509100
+ .long 1073131706
+ .long 2409629983
+ .long 1020069322
+ .long 2128523668
+ .long 1073137548
+ .long 3045605368
+ .long 1018579174
+ .long 2075485692
+ .long 1073142981
+ .long 3720571789
+ .long 1017557436
+ .long 121855976
+ .long 1073148047
+ .long 2391744767
+ .long 1020160645
+ .long 4181733780
+ .long 1073152780
+ .long 995028816
+ .long 1019681295
+ .long 2887813280
+ .long 1073157214
+ .long 218733247
+ .long 1020003509
+ .long 2862180896
+ .long 1073161375
+ .long 2043806490
+ .long 1018602288
+ .long 3909375184
+ .long 1073168973
+ .long 1559903412
+ .long 1020103444
+ .long 3533966292
+ .long 1073175738
+ .long 734884149
+ .long 1018462962
+ .long 3815044608
+ .long 1073181799
+ .long 3630523428
+ .long 1017250093
+ .long 739639376
+ .long 1073187261
+ .long 4167476661
+ .long 1020008277
+ .long 1068309648
+ .long 1073192207
+ .long 2110061437
+ .long 1019295858
+ .long 2350566352
+ .long 1073196707
+ .long 582596516
+ .long 1018568821
+ .long 2529520024
+ .long 1073200819
+ .long 745552787
+ .long 1019053165
+ .long 1841667508
+ .long 1073204591
+ .long 3982568700
+ .long 1016503327
+ .long 2242261080
+ .long 1073208063
+ .long 3433582258
+ .long 1016196763
+ .long 715134328
+ .long 1073211270
+ .long 355901358
+ .long 1020087916
+ .long 2700735876
+ .long 1073214240
+ .long 3640957736
+ .long 1019780205
+ .long 141607580
+ .long 1073217000
+ .long 2488245051
+ .long 1020262395
+ .long 287934404
+ .long 1073219570
+ .long 2392691085
+ .long 1019883292
+ .long 2363373988
+ .long 1073221969
+ .long 4194561737
+ .long 1019237447
+ .long 3829340424
+ .long 1073224214
+ .long 429455526
+ .long 1019490975
+ .long 1988805928
+ .long 1073226320
+ .long 3029848706
+ .long 1018104889
+ .long 1647572320
+ .long 1073230161
+ .long 10289938
+ .long 1017394880
+ .long 3988000624
+ .long 1073233576
+ .long 1957559169
+ .long 1019434816
+ .long 4263843944
+ .long 1073236633
+ .long 204710264
+ .long 1019908761
+ .long 663197724
+ .long 1073239386
+ .long 1921757578
+ .long 1019778948
+ .long 3560800700
+ .long 1073241876
+ .long 3994348896
+ .long 1019230192
+ .long 2441785656
+ .long 1073244141
+ .long 871468611
+ .long 1014800505
+ .long 3277400272
+ .long 1073246209
+ .long 4092218139
+ .long 1020040842
+ .long 3951990120
+ .long 1073248105
+ .long 4276546478
+ .long 1019763677
+ .long 2737338540
+ .long 1073249850
+ .long 252776012
+ .long 1018794951
+ .long 1511361316
+ .long 1073251461
+ .long 3119653999
+ .long 1018514803
+ .long 3969162516
+ .long 1073252952
+ .long 1037069016
+ .long 1016792900
+ .long 413985240
+ .long 1073254338
+ .long 4110171432
+ .long 1020001345
+ .long 3681283576
+ .long 1073255627
+ .long 1463092818
+ .long 1020260354
+ .long 3146455488
+ .long 1073256831
+ .long 1031209123
+ .long 1016554799
+ .long 95214512
+ .long 1073257958
+ .long 1373808632
+ .long 1019493031
+ .long 4250240828
+ .long 1073259013
+ .long 3891047882
+ .long 1020108730
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 1072243195
+ .long 856972295
+ .long 1015129638
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 3221823995
+ .long 856972295
+ .long 3164710438
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 3164710438
+ .long 1413754136
+ .long 3221823995
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 2006262985
+ .long 1069310863
+ .long 2358449471
+ .long 3217342131
+ .long 3845454352
+ .long 1069952297
+ .long 2829679149
+ .long 1073771565
+ .long 4294967295
+ .long 2148532223
+ .long 0
+ .long 0
+ .long 0
+ .long 1130364928
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .type static_const_table,@object
+ .size static_const_table,3024
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_cosh.S b/libm/x86/e_cosh.S
new file mode 100644
index 0000000..ecea8f4
--- /dev/null
+++ b/libm/x86/e_cosh.S
@@ -0,0 +1,1349 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// cosh(x)=(exp(x)+exp(-x))/2
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7),
+// f=0.b1 b2 ... b7, k integer
+// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f]
+// Tp stores higher 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision
+//
+// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14},
+// for |x| in [1/8,3*2^8)
+// e^{-|x|}=2^{-k-f}*2^{-r}
+//
+// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp=
+// =2^k*Tp+2^k*Tp*P15+2^k*Dp
+// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)
+//
+// For |x| in [1/8, 3*2^7), cosh(x) is formed as
+// RN(2^k*Tp+2^{-k}*Tn)+2^k*Tp*P15+2^{-k}*Tn*P`15+2^{-k}*TnL+2^{-k}*Dn+2^k*Dp
+//
+// For |x| in [3*2^7, 3*2^8), (e^|x|)/2 is returned, and
+// the result is checked for overflow.
+//
+// For |x|<1/8, a Taylor polynomial expansion is used (degree 10)
+// (error bound for polynomial expansion is below 0.501 ulp)
+//
+// Special cases:
+// cosh(NaN) = quiet NaN, and raise invalid exception
+// cosh(INF) = that INF
+// cosh(0)=1
+// for finite argument, only cosh(0)=1 is exact
+// For IEEE double
+// cosh(x) overflows
+// for x > 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin cosh
+ENTRY(cosh)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ movsd 4240(%ebx), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd 4192(%ebx), %xmm1
+ movsd 4200(%ebx), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd 4096(%ebx), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ andl $32767, %ecx
+ subl $16320, %ecx
+ cmpl $200, %ecx
+ jae .L_2TAG_PACKET_0.0.2
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ movapd %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ xorpd %xmm5, %xmm5
+ subsd %xmm6, %xmm3
+ movapd 4112(%ebx), %xmm4
+ addsd %xmm1, %xmm2
+ movapd 4128(%ebx), %xmm6
+ subsd %xmm3, %xmm7
+ movl $32704, %edx
+ pinsrw $3, %edx, %xmm5
+ movapd 4144(%ebx), %xmm1
+ addsd %xmm7, %xmm2
+ movl $127, %edx
+ andl %eax, %edx
+ addl %edx, %edx
+ shrl $3, %eax
+ andl $65520, %eax
+ addl $16352, %eax
+ xorpd %xmm0, %xmm0
+ cmpl $184, %ecx
+ jae .L_2TAG_PACKET_1.0.2
+ pshufd $68, %xmm5, %xmm5
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ psubw %xmm0, %xmm5
+ mulpd (%ebx,%edx,8), %xmm0
+ mulpd 2048(%ebx,%edx,8), %xmm5
+ pshufd $68, %xmm2, %xmm3
+ movapd 4160(%ebx), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ mulpd %xmm3, %xmm3
+ mulpd %xmm2, %xmm4
+ mulpd %xmm2, %xmm6
+ mulpd 4176(%ebx), %xmm2
+ mulpd %xmm3, %xmm1
+ mulpd %xmm3, %xmm7
+ mulpd %xmm3, %xmm4
+ mulpd %xmm3, %xmm1
+ addpd %xmm7, %xmm6
+ movapd %xmm0, %xmm7
+ addpd %xmm1, %xmm4
+ shufpd $0, %xmm5, %xmm7
+ addpd %xmm5, %xmm0
+ mulpd %xmm7, %xmm2
+ addpd %xmm6, %xmm4
+ subsd %xmm0, %xmm7
+ mulpd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm5, %xmm7
+ addpd %xmm2, %xmm4
+ addsd %xmm6, %xmm7
+ pshufd $238, %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ addl $16320, %ecx
+ cmpl $16320, %ecx
+ ja .L_2TAG_PACKET_3.0.2
+ cmpl $15952, %ecx
+ jae .L_2TAG_PACKET_4.0.2
+ addsd %xmm2, %xmm6
+ movsd 4248(%ebx), %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_1.0.2:
+ subl $16352, %eax
+ movl %eax, %ecx
+ andl $32752, %eax
+ shrl $1, %eax
+ andl $65520, %eax
+ subl %eax, %ecx
+ addl $16352, %eax
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ mulpd (%ebx,%edx,8), %xmm0
+ pshufd $68, %xmm2, %xmm3
+ movsd 4160(%ebx), %xmm7
+ mulsd %xmm3, %xmm3
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd 4176(%ebx), %xmm2
+ mulsd %xmm3, %xmm1
+ mulsd %xmm3, %xmm7
+ mulsd %xmm3, %xmm4
+ addl $16368, %ecx
+ pinsrw $3, %ecx, %xmm5
+ mulsd %xmm3, %xmm1
+ addsd %xmm7, %xmm6
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ addsd %xmm6, %xmm4
+ mulsd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm6, %xmm4
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm5, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ movl $64, %edx
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_5.0.2
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_4.0.2:
+ movapd 4208(%ebx), %xmm1
+ mulpd %xmm5, %xmm5
+ movapd 4224(%ebx), %xmm2
+ xorpd %xmm3, %xmm3
+ movapd %xmm5, %xmm0
+ mulpd %xmm5, %xmm1
+ movsd 4248(%ebx), %xmm6
+ mulpd %xmm5, %xmm5
+ movl $16352, %eax
+ pinsrw $3, %eax, %xmm3
+ addpd %xmm2, %xmm1
+ mulpd %xmm5, %xmm1
+ pshufd $238, %xmm1, %xmm2
+ mulsd %xmm1, %xmm5
+ mulsd %xmm3, %xmm0
+ addsd %xmm5, %xmm2
+ addsd %xmm2, %xmm0
+ addsd %xmm6, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_3.0.2:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ xorpd %xmm0, %xmm0
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ mulsd %xmm0, %xmm0
+ movl $64, %edx
+.L_2TAG_PACKET_5.0.2:
+ movsd %xmm0, (%esp)
+ movsd 112(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_6.0.2:
+ mulsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_2.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_7.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(cosh)
+# -- End cosh
+
+# Start file scope ASM
+ALIAS_SYMBOL(coshl, cosh);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 3706687593
+ .long 1073526560
+ .long 3521726940
+ .long 1014301643
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .long 3607404736
+ .long 1044146952
+ .long 3607404736
+ .long 3191630600
+ .long 4277811695
+ .long 1063661122
+ .long 4277811695
+ .long 3211144770
+ .long 2140175755
+ .long 1033864261
+ .long 2140175755
+ .long 1033864261
+ .long 4289495988
+ .long 1054113747
+ .long 4289495988
+ .long 1054113747
+ .long 4277811695
+ .long 1064709698
+ .long 4277811695
+ .long 3212193346
+ .long 1610612736
+ .long 1080497479
+ .long 4166901572
+ .long 1053077003
+ .long 3078135644
+ .long 1049787983
+ .long 381774870
+ .long 1062650220
+ .long 436314137
+ .long 1056571808
+ .long 1431655765
+ .long 1067799893
+ .long 4160749568
+ .long 2147483647
+ .long 0
+ .long 1072693248
+ .type static_const_table,@object
+ .size static_const_table,4256
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_exp.S b/libm/x86/e_exp.S
new file mode 100644
index 0000000..eab619d
--- /dev/null
+++ b/libm/x86/e_exp.S
@@ -0,0 +1,576 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Description:
+// Let K = 64 (table size).
+// x x/log(2) n
+// e = 2 = 2 * T[j] * (1 + P(y))
+// where
+// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K]
+// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2]
+// j/K
+// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
+//
+// P(y) is a minimax polynomial approximation of exp(x)-1
+// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
+//
+// To avoid problems with arithmetic overflow and underflow,
+// n n1 n2
+// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
+// where BIAS is a value of exponent bias.
+//
+// Special cases:
+// exp(NaN) = NaN
+// exp(+INF) = +INF
+// exp(-INF) = 0
+// exp(x) = 1 for subnormals
+// for finite argument, only exp(0)=1 is exact
+// For IEEE double
+// if x > 709.782712893383973096 then exp(x) overflow
+// if x < -745.133219101941108420 then exp(x) underflow
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin exp
+ENTRY(exp)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 64(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ unpcklpd %xmm0, %xmm0
+ movapd 64(%ebx), %xmm1
+ movapd 48(%ebx), %xmm6
+ movapd 80(%ebx), %xmm2
+ movapd 96(%ebx), %xmm3
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ movl $16527, %edx
+ subl %eax, %edx
+ subl $15504, %eax
+ orl %eax, %edx
+ cmpl $-2147483648, %edx
+ jae .L_2TAG_PACKET_0.0.2
+ mulpd %xmm0, %xmm1
+ addpd %xmm6, %xmm1
+ movapd %xmm1, %xmm7
+ subpd %xmm6, %xmm1
+ mulpd %xmm1, %xmm2
+ movapd 128(%ebx), %xmm4
+ mulpd %xmm1, %xmm3
+ movapd 144(%ebx), %xmm5
+ subpd %xmm2, %xmm0
+ movd %xmm7, %eax
+ movl %eax, %ecx
+ andl $63, %ecx
+ shll $4, %ecx
+ sarl $6, %eax
+ movl %eax, %edx
+ movdqa 16(%ebx), %xmm6
+ pand %xmm6, %xmm7
+ movdqa 32(%ebx), %xmm6
+ paddq %xmm6, %xmm7
+ psllq $46, %xmm7
+ subpd %xmm3, %xmm0
+ movapd 160(%ebx,%ecx), %xmm2
+ mulpd %xmm0, %xmm4
+ movapd %xmm0, %xmm6
+ movapd %xmm0, %xmm1
+ mulpd %xmm6, %xmm6
+ mulpd %xmm6, %xmm0
+ addpd %xmm4, %xmm5
+ mulsd %xmm6, %xmm0
+ mulpd 112(%ebx), %xmm6
+ addsd %xmm2, %xmm1
+ unpckhpd %xmm2, %xmm2
+ mulpd %xmm5, %xmm0
+ addsd %xmm0, %xmm1
+ orpd %xmm7, %xmm2
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ addsd %xmm6, %xmm0
+ addl $894, %edx
+ cmpl $1916, %edx
+ ja .L_2TAG_PACKET_1.0.2
+ mulsd %xmm2, %xmm0
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_1.0.2:
+ fstcw 24(%esp)
+ movzwl 24(%esp), %edx
+ orl $768, %edx
+ movw %dx, 28(%esp)
+ fldcw 28(%esp)
+ movl %eax, %edx
+ sarl $1, %eax
+ subl %eax, %edx
+ movdqa (%ebx), %xmm6
+ pandn %xmm2, %xmm6
+ addl $1023, %eax
+ movd %eax, %xmm3
+ psllq $52, %xmm3
+ orpd %xmm3, %xmm6
+ addl $1023, %edx
+ movd %edx, %xmm4
+ psllq $52, %xmm4
+ movsd %xmm0, 8(%esp)
+ fldl 8(%esp)
+ movsd %xmm6, 16(%esp)
+ fldl 16(%esp)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ movsd %xmm4, 8(%esp)
+ fldl 8(%esp)
+ fmulp %st, %st(1)
+ fstpl 8(%esp)
+ movsd 8(%esp), %xmm0
+ fldcw 24(%esp)
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_3.0.2
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_4.0.2
+ jmp .L_2TAG_PACKET_2.0.2
+ cmpl $-2147483648, %ecx
+ jb .L_2TAG_PACKET_3.0.2
+ cmpl $-1064950997, %ecx
+ jb .L_2TAG_PACKET_2.0.2
+ ja .L_2TAG_PACKET_4.0.2
+ movl 128(%esp), %edx
+ cmpl $-17155601, %edx
+ jb .L_2TAG_PACKET_2.0.2
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_3.0.2:
+ movl $14, %edx
+ jmp .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_4.0.2:
+ movl $15, %edx
+.L_2TAG_PACKET_5.0.2:
+ movsd %xmm0, (%esp)
+ movsd 128(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_7.0.2:
+ cmpl $2146435072, %eax
+ jae .L_2TAG_PACKET_8.0.2
+ movl 132(%esp), %eax
+ cmpl $-2147483648, %eax
+ jae .L_2TAG_PACKET_9.0.2
+ movsd 1208(%ebx), %xmm0
+ mulsd %xmm0, %xmm0
+ movl $14, %edx
+ jmp .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_9.0.2:
+ movsd 1216(%ebx), %xmm0
+ mulsd %xmm0, %xmm0
+ movl $15, %edx
+ jmp .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_8.0.2:
+ movl 128(%esp), %edx
+ cmpl $2146435072, %eax
+ ja .L_2TAG_PACKET_10.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_10.0.2
+ movl 132(%esp), %eax
+ cmpl $2146435072, %eax
+ jne .L_2TAG_PACKET_11.0.2
+ movsd 1192(%ebx), %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_11.0.2:
+ movsd 1200(%ebx), %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_10.0.2:
+ movsd 128(%esp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ movl 132(%esp), %eax
+ andl $2147483647, %eax
+ cmpl $1083179008, %eax
+ jae .L_2TAG_PACKET_7.0.2
+ movsd 128(%esp), %xmm0
+ addsd 1184(%ebx), %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_2.0.2:
+ movsd %xmm0, 48(%esp)
+ fldl 48(%esp)
+.L_2TAG_PACKET_6.0.2:
+ movl 64(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(exp)
+# -- End exp
+
+# Start file scope ASM
+ALIAS_SYMBOL(expl, exp);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 4293918720
+ .long 0
+ .long 4293918720
+ .long 4294967232
+ .long 0
+ .long 4294967232
+ .long 0
+ .long 65472
+ .long 0
+ .long 65472
+ .long 0
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 1127743488
+ .long 1697350398
+ .long 1079448903
+ .long 1697350398
+ .long 1079448903
+ .long 4277796864
+ .long 1065758274
+ .long 4277796864
+ .long 1065758274
+ .long 3164486458
+ .long 1025308570
+ .long 3164486458
+ .long 1025308570
+ .long 4294967294
+ .long 1071644671
+ .long 4294967294
+ .long 1071644671
+ .long 3811088480
+ .long 1062650204
+ .long 1432067621
+ .long 1067799893
+ .long 3230715663
+ .long 1065423125
+ .long 1431604129
+ .long 1069897045
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 235107661
+ .long 1018002367
+ .long 1048019040
+ .long 11418
+ .long 896005651
+ .long 1015861842
+ .long 3541402996
+ .long 22960
+ .long 1642514529
+ .long 1012987726
+ .long 410360776
+ .long 34629
+ .long 1568897900
+ .long 1016568486
+ .long 1828292879
+ .long 46424
+ .long 1882168529
+ .long 1010744893
+ .long 852742562
+ .long 58348
+ .long 509852888
+ .long 1017336174
+ .long 3490863952
+ .long 70401
+ .long 653277307
+ .long 1017431380
+ .long 2930322911
+ .long 82586
+ .long 1649557430
+ .long 1017729363
+ .long 1014845818
+ .long 94904
+ .long 1058231231
+ .long 1015777676
+ .long 3949972341
+ .long 107355
+ .long 1044000607
+ .long 1016786167
+ .long 828946858
+ .long 119943
+ .long 1151779725
+ .long 1015705409
+ .long 2288159958
+ .long 132667
+ .long 3819481236
+ .long 1016499965
+ .long 1853186616
+ .long 145530
+ .long 2552227826
+ .long 1015039787
+ .long 1709341917
+ .long 158533
+ .long 1829350193
+ .long 1015216097
+ .long 4112506593
+ .long 171677
+ .long 1913391795
+ .long 1015756674
+ .long 2799960843
+ .long 184965
+ .long 1303423926
+ .long 1015238005
+ .long 171030293
+ .long 198398
+ .long 1574172746
+ .long 1016061241
+ .long 2992903935
+ .long 211976
+ .long 3424156969
+ .long 1017196428
+ .long 926591434
+ .long 225703
+ .long 1938513547
+ .long 1017631273
+ .long 887463926
+ .long 239579
+ .long 2804567149
+ .long 1015390024
+ .long 1276261410
+ .long 253606
+ .long 631083525
+ .long 1017690182
+ .long 569847337
+ .long 267786
+ .long 1623370770
+ .long 1011049453
+ .long 1617004845
+ .long 282120
+ .long 3667985273
+ .long 1013894369
+ .long 3049340112
+ .long 296610
+ .long 3145379760
+ .long 1014403278
+ .long 3577096743
+ .long 311258
+ .long 2603100681
+ .long 1017152460
+ .long 1990012070
+ .long 326066
+ .long 3249202951
+ .long 1017448880
+ .long 1453150081
+ .long 341035
+ .long 419288974
+ .long 1016280325
+ .long 917841882
+ .long 356167
+ .long 3793507337
+ .long 1016095713
+ .long 3712504873
+ .long 371463
+ .long 728023093
+ .long 1016345318
+ .long 363667784
+ .long 386927
+ .long 2582678538
+ .long 1017123460
+ .long 2956612996
+ .long 402558
+ .long 7592966
+ .long 1016721543
+ .long 2186617380
+ .long 418360
+ .long 228611441
+ .long 1016696141
+ .long 1719614412
+ .long 434334
+ .long 2261665670
+ .long 1017457593
+ .long 1013258798
+ .long 450482
+ .long 544148907
+ .long 1017323666
+ .long 3907805043
+ .long 466805
+ .long 2383914918
+ .long 1017143586
+ .long 1447192520
+ .long 483307
+ .long 1176412038
+ .long 1017267372
+ .long 1944781190
+ .long 499988
+ .long 2882956373
+ .long 1013312481
+ .long 919555682
+ .long 516851
+ .long 3154077648
+ .long 1016528543
+ .long 2571947538
+ .long 533897
+ .long 348651999
+ .long 1016405780
+ .long 2604962540
+ .long 551129
+ .long 3253791412
+ .long 1015920431
+ .long 1110089947
+ .long 568549
+ .long 1509121860
+ .long 1014756995
+ .long 2568320822
+ .long 586158
+ .long 2617649212
+ .long 1017340090
+ .long 2966275556
+ .long 603959
+ .long 553214634
+ .long 1016457425
+ .long 2682146383
+ .long 621954
+ .long 730975783
+ .long 1014083580
+ .long 2191782032
+ .long 640145
+ .long 1486499517
+ .long 1016818996
+ .long 2069751140
+ .long 658534
+ .long 2595788928
+ .long 1016407932
+ .long 2990417244
+ .long 677123
+ .long 1853053619
+ .long 1015310724
+ .long 1434058175
+ .long 695915
+ .long 2462790535
+ .long 1015814775
+ .long 2572866477
+ .long 714911
+ .long 3693944214
+ .long 1017259110
+ .long 3092190714
+ .long 734114
+ .long 2979333550
+ .long 1017188654
+ .long 4076559942
+ .long 753526
+ .long 174054861
+ .long 1014300631
+ .long 2420883922
+ .long 773150
+ .long 816778419
+ .long 1014197934
+ .long 3716502172
+ .long 792987
+ .long 3507050924
+ .long 1015341199
+ .long 777507147
+ .long 813041
+ .long 1821514088
+ .long 1013410604
+ .long 3706687593
+ .long 833312
+ .long 920623539
+ .long 1016295433
+ .long 1242007931
+ .long 853805
+ .long 2789017511
+ .long 1014276997
+ .long 3707479175
+ .long 874520
+ .long 3586233004
+ .long 1015962192
+ .long 64696965
+ .long 895462
+ .long 474650514
+ .long 1016642419
+ .long 863738718
+ .long 916631
+ .long 1614448851
+ .long 1014281732
+ .long 3884662774
+ .long 938030
+ .long 2450082086
+ .long 1016164135
+ .long 2728693977
+ .long 959663
+ .long 1101668360
+ .long 1015989180
+ .long 3999357479
+ .long 981531
+ .long 835814894
+ .long 1015702697
+ .long 1533953344
+ .long 1003638
+ .long 1301400989
+ .long 1014466875
+ .long 2174652632
+ .long 1025985
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 2146435071
+ .long 0
+ .long 1048576
+ .type static_const_table,@object
+ .size static_const_table,1224
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_hypot.S b/libm/x86/e_hypot.S
new file mode 100644
index 0000000..6a143e5
--- /dev/null
+++ b/libm/x86/e_hypot.S
@@ -0,0 +1,220 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// X87 version:
+// Use 80-bit FPU precision fmul, fsqrt to compute square and sqrt.
+//
+// SSE version:
+// Swap x, y if |x|<|y|
+// For x=2^k*x, get y=y*2^(-k)
+// Get S ~ sqrt(x^2+y^2) (leading 1 + leading 25 mantissa bits)
+//
+// Get D = ( RN(x^2+y^2) - S^2 ) + ( x^2 - RN(x^2) ) +
+// + ( y^2 - ((RN(x^2+y^2)-RN(x^2)) )
+//
+// Result is 2^k*(S + Se), where Se = S*e
+// S*e is approximated as (D/2S)*( 1 - (D/2S)^2*1.0/S )
+//
+// Return 2^k*(S+Se)
+//
+// For |y/x|<2^(-64), return x
+//
+// For cases where maximum biased exponent is either greater than 7fdh or
+// below 32, take a special path to check for special cases (0, NaN, Inf),
+// possible overflow, and more accurate computation for denormal results
+//
+// Special cases:
+// hypot(x,y), hypot(y,x), and hypot(x,-y) are equivalent
+// hypot(x,+-0) is equivalent to fabs(x)
+// hypot(x,y) = y if (x==NaN or x==INF) and y==INF
+// hypot(x,y) = x if (x==NaN or x==INF) and y!=INF (even if y==NaN!)
+// hypot(x,y) = y if (x!=NaN and x!=INF) and (y==NaN or y==INF)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin hypot
+ENTRY(hypot)
+# parameter 1: 8 + %ebp
+# parameter 2: 16 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $152, %esp
+ movl %ebx, 96(%esp)
+ call static_func
+ movl %eax, %ebx
+ movapd (%ebx), %xmm3
+ movsd 160(%esp), %xmm0
+ movsd 168(%esp), %xmm1
+ andpd %xmm3, %xmm0
+ andpd %xmm3, %xmm1
+ pextrw $3, %xmm0, %eax
+ pextrw $3, %xmm1, %edx
+ cmpl $24528, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ cmpl $24528, %edx
+ ja .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ fldl 160(%esp)
+ fldl 168(%esp)
+ fxch %st(1)
+ fmul %st(0), %st
+ fxch %st(1)
+ nop
+ fmul %st(0), %st
+ faddp %st, %st(1)
+ fsqrt
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ cmpl $32752, %eax
+ movl %eax, %ecx
+ jae .L_2TAG_PACKET_3.0.2
+ subl %edx, %ecx
+ cmpl $32752, %edx
+ jae .L_2TAG_PACKET_3.0.2
+ addl $928, %ecx
+ addl %edx, %eax
+ cmpl $1856, %ecx
+ ja .L_2TAG_PACKET_4.0.2
+ cmpl $49056, %eax
+ jb .L_2TAG_PACKET_1.0.2
+ fldl 160(%esp)
+ fldl 168(%esp)
+ fxch %st(1)
+ fmul %st(0), %st
+ fxch %st(1)
+ nop
+ fmul %st(0), %st
+ faddp %st, %st(1)
+ fsqrt
+.L_2TAG_PACKET_5.0.2:
+ fstl (%esp)
+ fstpt 16(%esp)
+ xorl %eax, %eax
+ movw 24(%esp), %ax
+ cmpl $17407, %eax
+ jae .L_2TAG_PACKET_6.0.2
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_4.0.2:
+ movsd %xmm0, 32(%esp)
+ movsd %xmm1, 40(%esp)
+ fldl 32(%esp)
+ faddl 40(%esp)
+ jmp .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_6.0.2:
+ movl $46, %edx
+.L_2TAG_PACKET_8.0.2:
+ movsd 160(%esp), %xmm0
+ movsd 168(%esp), %xmm1
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_3.0.2:
+ shufpd $0, %xmm1, %xmm0
+ movdqa %xmm0, %xmm2
+ movdqa 16(%ebx), %xmm3
+ movsd %xmm0, 32(%esp)
+ movsd %xmm1, 40(%esp)
+ cmppd $3, %xmm0, %xmm2
+ cmppd $0, %xmm0, %xmm3
+ movmskpd %xmm2, %edx
+ movmskpd %xmm3, %eax
+ testl %edx, %edx
+ je .L_2TAG_PACKET_9.0.2
+ fldl 32(%esp)
+ fmull 40(%esp)
+ testl $1, %eax
+ jne .L_2TAG_PACKET_10.0.2
+ testl $2, %eax
+ jne .L_2TAG_PACKET_11.0.2
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_9.0.2:
+ fldl 32(%esp)
+ faddl 40(%esp)
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_10.0.2:
+ fstpl 40(%esp)
+ fldl 32(%esp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_11.0.2:
+ fstpl 32(%esp)
+ fldl 40(%esp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_2.0.2:
+.L_2TAG_PACKET_7.0.2:
+ movl 96(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(hypot)
+# -- End hypot
+
+# Start file scope ASM
+ALIAS_SYMBOL(hypotl, hypot);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 4294967295
+ .long 2147483647
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 2146435072
+ .type static_const_table,@object
+ .size static_const_table,32
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_log.S b/libm/x86/e_log.S
new file mode 100644
index 0000000..a6181ca
--- /dev/null
+++ b/libm/x86/e_log.S
@@ -0,0 +1,780 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpss instruction (B0)
+// B = int((B0*2^7+0.5))/2^7
+//
+// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
+//
+// Result: k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6) and
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log(NaN) = quiet NaN, and raise invalid exception
+// log(+INF) = that INF
+// log(0) = -INF with divide-by-zero exception raised
+// log(1) = +0
+// log(x) = NaN with invalid exception raised if x < -0, including -INF
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin log
+ENTRY(log)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ xorpd %xmm3, %xmm3
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm3
+ movsd 112(%esp), %xmm0
+ movapd %xmm0, %xmm1
+ movl $32768, %ecx
+ movd %ecx, %xmm4
+ movsd 2128(%ebx), %xmm5
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ psllq $5, %xmm0
+ movl $16352, %ecx
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ paddd %xmm4, %xmm0
+ orpd %xmm3, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm1, %xmm5
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm1
+ mulpd %xmm0, %xmm5
+ andl $32752, %eax
+ subl %ecx, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulsd %xmm0, %xmm1
+ movsd 2064(%ebx), %xmm6
+ movapd 2080(%ebx), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd (%ebx,%edx), %xmm0
+ movapd 2096(%ebx), %xmm4
+ addsd %xmm5, %xmm1
+ movapd 2112(%ebx), %xmm2
+ mulsd %xmm7, %xmm6
+ pshufd $68, %xmm1, %xmm5
+ mulsd 2072(%ebx), %xmm7
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm4
+ mulpd %xmm5, %xmm5
+ pshufd $228, %xmm0, %xmm6
+ addsd %xmm1, %xmm0
+ addpd %xmm2, %xmm4
+ mulpd %xmm5, %xmm3
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm4
+ pshufd $238, %xmm0, %xmm2
+ addsd %xmm6, %xmm1
+ mulsd %xmm5, %xmm5
+ addsd %xmm2, %xmm7
+ addpd %xmm3, %xmm4
+ addsd %xmm7, %xmm1
+ mulpd %xmm5, %xmm4
+ addsd %xmm4, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ movsd 112(%esp), %xmm0
+ movapd %xmm0, %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ cmpl $16, %eax
+ jb .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_6.0.2:
+ ja .L_2TAG_PACKET_5.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_5.0.2
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_3.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ movl $3, %edx
+ mulsd %xmm1, %xmm0
+.L_2TAG_PACKET_9.0.2:
+ movsd %xmm0, (%esp)
+ movsd 112(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_10.0.2
+.L_2TAG_PACKET_8.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $2, %edx
+ jmp .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_4.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_8.0.2
+ xorpd %xmm1, %xmm1
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ movapd %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ psllq $5, %xmm0
+ movl $18416, %ecx
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_10.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(log)
+# -- End log
+
+# Start file scope ASM
+ALIAS_SYMBOL(logl, log);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 4277811200
+ .long 1072049730
+ .long 2479318832
+ .long 1026487127
+ .long 2854492160
+ .long 1072033410
+ .long 215631550
+ .long 1025638968
+ .long 1547061248
+ .long 1072017216
+ .long 2886781435
+ .long 1026423395
+ .long 649825280
+ .long 1072001146
+ .long 4281533405
+ .long 1024038923
+ .long 646346752
+ .long 1071985198
+ .long 1562735921
+ .long 1023790276
+ .long 2203734016
+ .long 1071969370
+ .long 1838397691
+ .long 3173936209
+ .long 1872169984
+ .long 1071953661
+ .long 3981202460
+ .long 1022325013
+ .long 669557760
+ .long 1071938069
+ .long 4182597802
+ .long 3173174122
+ .long 4076413952
+ .long 1071922591
+ .long 1209029111
+ .long 3170736207
+ .long 556125184
+ .long 1071907228
+ .long 821086028
+ .long 3173437049
+ .long 204914688
+ .long 1071891976
+ .long 2097025986
+ .long 3171071798
+ .long 387545088
+ .long 1071876834
+ .long 3142936996
+ .long 3173092218
+ .long 2912783360
+ .long 1071861800
+ .long 2502420140
+ .long 1024505919
+ .long 1144260608
+ .long 1071846874
+ .long 3315658140
+ .long 3173469843
+ .long 1471209472
+ .long 1071832053
+ .long 129621009
+ .long 3172443877
+ .long 1829683200
+ .long 1071817336
+ .long 3885467693
+ .long 1025535275
+ .long 288676864
+ .long 1071802722
+ .long 86139472
+ .long 3171639793
+ .long 3636378624
+ .long 1071788208
+ .long 1850238587
+ .long 1024654342
+ .long 1606817792
+ .long 1071773795
+ .long 3388899795
+ .long 3173675586
+ .long 1236164608
+ .long 1071759480
+ .long 3983599207
+ .long 1020046558
+ .long 1089616896
+ .long 1071745262
+ .long 4171974224
+ .long 1024773198
+ .long 4143093760
+ .long 1071731139
+ .long 2727587401
+ .long 3173965207
+ .long 600267776
+ .long 1071717112
+ .long 3147685042
+ .long 3173353031
+ .long 2249313280
+ .long 1071703177
+ .long 125835074
+ .long 1025255832
+ .long 3805303808
+ .long 1071689334
+ .long 2289991207
+ .long 1025460331
+ .long 87278592
+ .long 1071675583
+ .long 1106114045
+ .long 1025933602
+ .long 3195405312
+ .long 1071661920
+ .long 3885316576
+ .long 3171206239
+ .long 3853649920
+ .long 1071648346
+ .long 2977069852
+ .long 3171236771
+ .long 2944026624
+ .long 1071625048
+ .long 1008093493
+ .long 1023444474
+ .long 3993180160
+ .long 1071598247
+ .long 1862355595
+ .long 1024642533
+ .long 1454641152
+ .long 1071571617
+ .long 1514603089
+ .long 1026500596
+ .long 3286085632
+ .long 1071545154
+ .long 1400028424
+ .long 3173279056
+ .long 438773760
+ .long 1071518858
+ .long 120727864
+ .long 3172148914
+ .long 1212979200
+ .long 1071492725
+ .long 1625055594
+ .long 3172901933
+ .long 1189017600
+ .long 1071466754
+ .long 3920062376
+ .long 1025727407
+ .long 403064832
+ .long 1071440943
+ .long 1053271728
+ .long 3171391427
+ .long 3343210496
+ .long 1071415289
+ .long 3243395502
+ .long 3173627613
+ .long 1765777408
+ .long 1071389792
+ .long 2145968512
+ .long 1026354304
+ .long 461430784
+ .long 1071364449
+ .long 4094322285
+ .long 1026021467
+ .long 71706624
+ .long 1071339258
+ .long 763632021
+ .long 1024496933
+ .long 1380503552
+ .long 1071314217
+ .long 1383547992
+ .long 3173088453
+ .long 1015732224
+ .long 1071289325
+ .long 3198646877
+ .long 1025390322
+ .long 35977216
+ .long 1071264580
+ .long 2141026805
+ .long 1025754693
+ .long 3927306240
+ .long 1071239979
+ .long 282116272
+ .long 3173394334
+ .long 1125341184
+ .long 1071215523
+ .long 2768427504
+ .long 3172279059
+ .long 1666971648
+ .long 1071191208
+ .long 786837629
+ .long 3172427445
+ .long 2827694080
+ .long 1071167033
+ .long 3857122416
+ .long 3173014241
+ .long 2003683328
+ .long 1071142997
+ .long 859010954
+ .long 1026545007
+ .long 1004017664
+ .long 1071119098
+ .long 3356644970
+ .long 3173458064
+ .long 1753020416
+ .long 1071095334
+ .long 788338552
+ .long 1026157693
+ .long 1992718336
+ .long 1071071704
+ .long 1239179443
+ .long 1026394889
+ .long 3870234624
+ .long 1071048206
+ .long 2082614663
+ .long 1024926053
+ .long 1050437632
+ .long 1071024840
+ .long 660007840
+ .long 1025548499
+ .long 188395520
+ .long 1071001603
+ .long 3878792704
+ .long 3173889571
+ .long 3747176448
+ .long 1070978493
+ .long 144991708
+ .long 3171552042
+ .long 1405669376
+ .long 1070955511
+ .long 3999088879
+ .long 1025486317
+ .long 121151488
+ .long 1070932654
+ .long 2170865497
+ .long 1026473584
+ .long 2652319744
+ .long 1070909920
+ .long 453695652
+ .long 3173916809
+ .long 3262236672
+ .long 1070887309
+ .long 157800053
+ .long 3173984206
+ .long 601221120
+ .long 1070864820
+ .long 3968917661
+ .long 1023992886
+ .long 1999843328
+ .long 1070842450
+ .long 3053895004
+ .long 1024998228
+ .long 1992167424
+ .long 1070820199
+ .long 2968614856
+ .long 1024552653
+ .long 3788726272
+ .long 1070798065
+ .long 3542170808
+ .long 3173573242
+ .long 2094829568
+ .long 1070776048
+ .long 1246758132
+ .long 1026202874
+ .long 288675840
+ .long 1070754146
+ .long 3747328950
+ .long 1026331585
+ .long 1829681152
+ .long 1070732357
+ .long 3125197546
+ .long 1024100318
+ .long 1666869248
+ .long 1070710681
+ .long 1363656119
+ .long 1026336493
+ .long 3417110528
+ .long 1070689116
+ .long 4154791553
+ .long 1026267853
+ .long 2183653376
+ .long 1070667662
+ .long 1671819292
+ .long 3173785870
+ .long 1734434816
+ .long 1070646317
+ .long 373091049
+ .long 1025972363
+ .long 1615681536
+ .long 1070625080
+ .long 384650897
+ .long 1022926043
+ .long 1445382144
+ .long 1070603950
+ .long 344320330
+ .long 3172397196
+ .long 1823715328
+ .long 1070569756
+ .long 3389841200
+ .long 1025231852
+ .long 3839688704
+ .long 1070527917
+ .long 1706790417
+ .long 3167363349
+ .long 4293332992
+ .long 1070486286
+ .long 1614935088
+ .long 1019351591
+ .long 2966720512
+ .long 1070444861
+ .long 4145393717
+ .long 3173711658
+ .long 4066729984
+ .long 1070403639
+ .long 1974925028
+ .long 3171437182
+ .long 3337621504
+ .long 1070362619
+ .long 3314953170
+ .long 3169971314
+ .long 943448064
+ .long 1070321799
+ .long 1498682038
+ .long 3173862340
+ .long 1465634816
+ .long 1070281176
+ .long 1319952810
+ .long 3171693965
+ .long 1015734272
+ .long 1070240749
+ .long 1347821929
+ .long 3173544515
+ .long 118001664
+ .long 1070200516
+ .long 1751482746
+ .long 1026134093
+ .long 3707174912
+ .long 1070160474
+ .long 1486946159
+ .long 1023930920
+ .long 3946381312
+ .long 1070120623
+ .long 2867408081
+ .long 3171368276
+ .long 1699848192
+ .long 1070080961
+ .long 2590187139
+ .long 1025379803
+ .long 2235846656
+ .long 1070041485
+ .long 1888568069
+ .long 3172754960
+ .long 2339729408
+ .long 1070002194
+ .long 3852214753
+ .long 3173323149
+ .long 3196850176
+ .long 1069963086
+ .long 742141560
+ .long 1025101707
+ .long 1800683520
+ .long 1069924160
+ .long 3949500444
+ .long 3172102179
+ .long 3835801600
+ .long 1069885413
+ .long 3848895943
+ .long 1025913832
+ .long 2201202688
+ .long 1069846845
+ .long 1425913464
+ .long 1025868665
+ .long 2778279936
+ .long 1069808453
+ .long 2120889677
+ .long 3173831128
+ .long 2954203136
+ .long 1069770236
+ .long 592147081
+ .long 1019621288
+ .long 210141184
+ .long 1069732193
+ .long 3414275233
+ .long 1023647084
+ .long 709476352
+ .long 1069694321
+ .long 2413027164
+ .long 1024462115
+ .long 2116284416
+ .long 1069656619
+ .long 1144559924
+ .long 1026336654
+ .long 2183651328
+ .long 1069619086
+ .long 3459057650
+ .long 1025634168
+ .long 3047047168
+ .long 1069581720
+ .long 1879674924
+ .long 3173508573
+ .long 970711040
+ .long 1069541521
+ .long 1335954173
+ .long 3173332182
+ .long 2198478848
+ .long 1069467449
+ .long 2951103968
+ .long 3173892200
+ .long 1669611520
+ .long 1069393703
+ .long 531044147
+ .long 1025149248
+ .long 29114368
+ .long 1069320280
+ .long 3327831251
+ .long 1025918673
+ .long 2376949760
+ .long 1069247176
+ .long 737634533
+ .long 3172176000
+ .long 1085390848
+ .long 1069174390
+ .long 3108243400
+ .long 3171828406
+ .long 1566130176
+ .long 1069101918
+ .long 985483226
+ .long 1025708380
+ .long 792780800
+ .long 1069029758
+ .long 4184866295
+ .long 1024426204
+ .long 183156736
+ .long 1068957907
+ .long 2845699378
+ .long 1022107277
+ .long 1301782528
+ .long 1068886362
+ .long 1012735262
+ .long 3173804294
+ .long 1562411008
+ .long 1068815121
+ .long 2197086703
+ .long 3170187813
+ .long 2815549440
+ .long 1068744181
+ .long 2782613207
+ .long 1026345054
+ .long 2756124672
+ .long 1068673540
+ .long 2929486205
+ .long 3173037800
+ .long 3511050240
+ .long 1068603195
+ .long 1443733147
+ .long 3173331549
+ .long 3047047168
+ .long 1068533144
+ .long 1879674924
+ .long 3172459997
+ .long 3221667840
+ .long 1068427825
+ .long 1338588027
+ .long 3171815742
+ .long 3453861888
+ .long 1068288883
+ .long 1205348359
+ .long 3172624626
+ .long 3506110464
+ .long 1068150514
+ .long 893105198
+ .long 1025571866
+ .long 346013696
+ .long 1068012714
+ .long 3495569021
+ .long 3172563349
+ .long 4074029056
+ .long 1067875476
+ .long 3961106338
+ .long 3171065595
+ .long 3559784448
+ .long 1067738798
+ .long 1975385384
+ .long 3173783155
+ .long 797769728
+ .long 1067602675
+ .long 3760305787
+ .long 1026047642
+ .long 2313633792
+ .long 1067467101
+ .long 1559353171
+ .long 1023480256
+ .long 3960766464
+ .long 1067213778
+ .long 1067365107
+ .long 1025865926
+ .long 684261376
+ .long 1066944805
+ .long 844762164
+ .long 3173687482
+ .long 630718464
+ .long 1066676905
+ .long 2458269694
+ .long 1024033081
+ .long 1486061568
+ .long 1066410070
+ .long 115537874
+ .long 3173243995
+ .long 2743664640
+ .long 1065886792
+ .long 3665098304
+ .long 3173471607
+ .long 1971912704
+ .long 1065357333
+ .long 2577214440
+ .long 3171993451
+ .long 1498939392
+ .long 1064306693
+ .long 3409036923
+ .long 1025599151
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 4277811200
+ .long 1067855426
+ .long 2479318832
+ .long 1022292823
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1030730101
+ .long 3217380702
+ .long 1431655765
+ .long 1070945621
+ .long 2576980378
+ .long 1070176665
+ .long 0
+ .long 3219128320
+ .long 0
+ .long 4294959104
+ .long 0
+ .long 4294959104
+ .type static_const_table,@object
+ .size static_const_table,2144
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_log10.S b/libm/x86/e_log10.S
new file mode 100644
index 0000000..09b2952
--- /dev/null
+++ b/libm/x86/e_log10.S
@@ -0,0 +1,795 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpss instruction (B0)
+// B = int((B0*LH*2^7+0.5))/2^7
+// LH is a short approximation for log10(e)
+//
+// Reduced argument: r=B*mx-LH (computed accurately in high and low parts)
+//
+// Result: k*log10(2) - log(B) + p(r)
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log10(0) = -INF with divide-by-zero exception raised
+// log10(1) = +0
+// log10(x) = NaN with invalid exception raised if x < -0, including -INF
+// log10(+INF) = +INF
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin log10
+ENTRY(log10)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movl $1054736384, %ecx
+ movd %ecx, %xmm7
+ xorpd %xmm3, %xmm3
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm3
+ movsd 112(%esp), %xmm0
+ movapd %xmm0, %xmm1
+ movl $32768, %edx
+ movd %edx, %xmm4
+ movapd 2128(%ebx), %xmm5
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $16352, %ecx
+ psllq $5, %xmm0
+ movsd 2144(%ebx), %xmm2
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $78, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ mulss %xmm7, %xmm0
+ orpd %xmm3, %xmm1
+ andpd %xmm1, %xmm5
+ paddd %xmm4, %xmm0
+ subsd %xmm5, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm6, %xmm0
+ andl $32752, %eax
+ subl %ecx, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ mulsd %xmm0, %xmm1
+ movsd 2064(%ebx), %xmm6
+ movapd 2080(%ebx), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd -1504(%ebx,%edx), %xmm0
+ movapd 2096(%ebx), %xmm4
+ addsd %xmm5, %xmm1
+ movapd 2112(%ebx), %xmm2
+ mulsd %xmm7, %xmm6
+ pshufd $68, %xmm1, %xmm5
+ mulsd 2072(%ebx), %xmm7
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm4
+ movsd 2152(%ebx), %xmm6
+ mulpd %xmm5, %xmm5
+ addpd %xmm2, %xmm4
+ mulpd %xmm5, %xmm3
+ pshufd $228, %xmm0, %xmm2
+ addsd %xmm1, %xmm0
+ mulsd %xmm1, %xmm4
+ subsd %xmm0, %xmm2
+ mulsd %xmm1, %xmm6
+ addsd %xmm2, %xmm1
+ pshufd $238, %xmm0, %xmm2
+ mulsd %xmm5, %xmm5
+ addsd %xmm2, %xmm7
+ addsd %xmm6, %xmm1
+ addpd %xmm3, %xmm4
+ addsd %xmm7, %xmm1
+ mulpd %xmm5, %xmm4
+ addsd %xmm4, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ movsd 112(%esp), %xmm0
+ movapd %xmm0, %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ cmpl $16, %eax
+ jb .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_6.0.2:
+ ja .L_2TAG_PACKET_5.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_5.0.2
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_3.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ movl $9, %edx
+ mulsd %xmm1, %xmm0
+.L_2TAG_PACKET_9.0.2:
+ movsd %xmm0, (%esp)
+ movsd 112(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_10.0.2
+.L_2TAG_PACKET_8.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $8, %edx
+ jmp .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_4.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_8.0.2
+ xorpd %xmm1, %xmm1
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movapd %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psllq $5, %xmm0
+ movsd 2144(%ebx), %xmm2
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $78, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_10.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(log10)
+# -- End log10
+
+# Start file scope ASM
+ALIAS_SYMBOL(log10l, log10);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 1352628224
+ .long 1070810131
+ .long 521319256
+ .long 1025503025
+ .long 2150839296
+ .long 1070801944
+ .long 3329350096
+ .long 3170190015
+ .long 1360613376
+ .long 1070793794
+ .long 2024059075
+ .long 1024991594
+ .long 1875350528
+ .long 1070785680
+ .long 2163882141
+ .long 3163564137
+ .long 2312126464
+ .long 1070777602
+ .long 1975711076
+ .long 1023674196
+ .long 1306336256
+ .long 1070769560
+ .long 3524899523
+ .long 3170508164
+ .long 1806334976
+ .long 1070761553
+ .long 4254777025
+ .long 1025238739
+ .long 2483193856
+ .long 1070753581
+ .long 3800671317
+ .long 3172916830
+ .long 2025350144
+ .long 1070745644
+ .long 1731514745
+ .long 1025501083
+ .long 3433285632
+ .long 1070737741
+ .long 2551857336
+ .long 3169662186
+ .long 1134317568
+ .long 1070729873
+ .long 3426297655
+ .long 3172637891
+ .long 2457152512
+ .long 1070722038
+ .long 63549415
+ .long 1025415416
+ .long 1861803008
+ .long 1070714237
+ .long 1910171636
+ .long 1023977580
+ .long 2414140416
+ .long 1070706469
+ .long 4002514337
+ .long 3170841618
+ .long 2900726784
+ .long 1070698734
+ .long 3268064083
+ .long 1022459609
+ .long 2123517952
+ .long 1070691032
+ .long 1767031218
+ .long 1022448156
+ .long 3194569728
+ .long 1070683362
+ .long 3402332618
+ .long 3171671160
+ .long 650882048
+ .long 1070675725
+ .long 4146023905
+ .long 3171023038
+ .long 1928988672
+ .long 1070668119
+ .long 1438617867
+ .long 1016360491
+ .long 1594908672
+ .long 1070660545
+ .long 971389377
+ .long 1024763979
+ .long 2818746368
+ .long 1070653002
+ .long 3555925341
+ .long 3172434821
+ .long 194584576
+ .long 1070645491
+ .long 943919215
+ .long 3172950063
+ .long 1215096832
+ .long 1070638010
+ .long 2283358588
+ .long 1022335098
+ .long 501519360
+ .long 1070630560
+ .long 480904295
+ .long 1024437959
+ .long 1278266368
+ .long 1070623140
+ .long 2755806066
+ .long 3172342012
+ .long 2487812096
+ .long 1070615750
+ .long 2489653202
+ .long 3172481099
+ .long 3085451264
+ .long 1070608390
+ .long 3759184951
+ .long 3172574892
+ .long 2039090176
+ .long 1070601060
+ .long 1361176676
+ .long 3172355319
+ .long 953057280
+ .long 1070591423
+ .long 1176587546
+ .long 3166422018
+ .long 3370524672
+ .long 1070576879
+ .long 3669570051
+ .long 1025376630
+ .long 749742080
+ .long 1070562394
+ .long 707700964
+ .long 3170814058
+ .long 4008353792
+ .long 1070547965
+ .long 3247327652
+ .long 1022431400
+ .long 2612455424
+ .long 1070533594
+ .long 2453457344
+ .long 3172322969
+ .long 3230920704
+ .long 1070519279
+ .long 1296781801
+ .long 1025115335
+ .long 3965253632
+ .long 1070505020
+ .long 373075289
+ .long 1017938528
+ .long 2593157120
+ .long 1070476669
+ .long 1068054086
+ .long 1021616576
+ .long 925962240
+ .long 1070448537
+ .long 850121213
+ .long 1023928989
+ .long 1732556800
+ .long 1070420620
+ .long 1305206740
+ .long 3172665570
+ .long 3815630848
+ .long 1070392915
+ .long 192642943
+ .long 3172699907
+ .long 2001758208
+ .long 1070365420
+ .long 2820786683
+ .long 1024704867
+ .long 16746496
+ .long 1070338131
+ .long 1399573110
+ .long 3171372773
+ .long 1886492672
+ .long 1070311044
+ .long 3621428075
+ .long 3172974358
+ .long 3338196992
+ .long 1070284157
+ .long 3793882035
+ .long 1025124701
+ .long 381769728
+ .long 1070257468
+ .long 3877933342
+ .long 3170195490
+ .long 2186491904
+ .long 1070230972
+ .long 1838687089
+ .long 1017927292
+ .long 1008330752
+ .long 1070204668
+ .long 2228321664
+ .long 1025352196
+ .long 2247065600
+ .long 1070178552
+ .long 1413900906
+ .long 3170902532
+ .long 2964070400
+ .long 1070152622
+ .long 3590454629
+ .long 1025016844
+ .long 465154048
+ .long 1070126876
+ .long 2079688550
+ .long 3172268183
+ .long 883615744
+ .long 1070101310
+ .long 989244452
+ .long 3171900485
+ .long 1993768960
+ .long 1070075922
+ .long 1124327841
+ .long 3172964992
+ .long 1794471936
+ .long 1070050710
+ .long 1140575046
+ .long 1022673726
+ .long 2797932544
+ .long 1070025671
+ .long 1894836933
+ .long 3172544059
+ .long 3433797632
+ .long 1070000803
+ .long 3221831166
+ .long 3171921685
+ .long 2338371584
+ .long 1069976104
+ .long 3732461053
+ .long 3164513518
+ .long 2644013056
+ .long 1069951571
+ .long 2519460462
+ .long 3172548740
+ .long 3383814144
+ .long 1069927202
+ .long 2290997657
+ .long 1025499649
+ .long 3781380096
+ .long 1069902995
+ .long 380479405
+ .long 1025184136
+ .long 3245785088
+ .long 1069878948
+ .long 1096398261
+ .long 3169885192
+ .long 1366712320
+ .long 1069855059
+ .long 2218343715
+ .long 3170281628
+ .long 2204717056
+ .long 1069831325
+ .long 2668334011
+ .long 1025264524
+ .long 1401772032
+ .long 1069807745
+ .long 4103993159
+ .long 1022925721
+ .long 3356721152
+ .long 1069784316
+ .long 3573790772
+ .long 3172186527
+ .long 4041148416
+ .long 1069761037
+ .long 4027691910
+ .long 3171276990
+ .long 3880151040
+ .long 1069737906
+ .long 4087118786
+ .long 3172710734
+ .long 3453364224
+ .long 1069714921
+ .long 99014299
+ .long 3172003077
+ .long 3491092480
+ .long 1069692080
+ .long 3801836701
+ .long 3172989287
+ .long 575580160
+ .long 1069669382
+ .long 1920406012
+ .long 3170874125
+ .long 22282240
+ .long 1069646824
+ .long 964193370
+ .long 1019363159
+ .long 2991429632
+ .long 1069624404
+ .long 3372589890
+ .long 1023425053
+ .long 2189645824
+ .long 1069602122
+ .long 2610503872
+ .long 1023652442
+ .long 3341467648
+ .long 1069579975
+ .long 1190292004
+ .long 1022425665
+ .long 3711293440
+ .long 1069557962
+ .long 1104795356
+ .long 1023625829
+ .long 1380401152
+ .long 1069524644
+ .long 1156998217
+ .long 1025100499
+ .long 765710336
+ .long 1069481144
+ .long 1736649113
+ .long 1024999439
+ .long 849412096
+ .long 1069437902
+ .long 2618178330
+ .long 3170853629
+ .long 1433104384
+ .long 1069394915
+ .long 43477267
+ .long 3170378811
+ .long 2548596736
+ .long 1069352180
+ .long 3967367063
+ .long 1025246584
+ .long 157577216
+ .long 1069309695
+ .long 100402533
+ .long 3172825502
+ .long 3326238720
+ .long 1069267455
+ .long 1176892909
+ .long 1025464099
+ .long 4155494400
+ .long 1069225459
+ .long 3713707617
+ .long 3172630046
+ .long 3545804800
+ .long 1069183704
+ .long 857007315
+ .long 1024965777
+ .long 2602520576
+ .long 1069142187
+ .long 2588758347
+ .long 1022463131
+ .long 2631196672
+ .long 1069100905
+ .long 2118424235
+ .long 1022490989
+ .long 838135808
+ .long 1069059856
+ .long 4117002727
+ .long 1024874520
+ .long 3210903552
+ .long 1069019036
+ .long 650070125
+ .long 3172012966
+ .long 3039211520
+ .long 1068978444
+ .long 438055812
+ .long 1017743757
+ .long 2385633280
+ .long 1068938077
+ .long 3011990369
+ .long 3171312044
+ .long 3491618816
+ .long 1068897932
+ .long 712813818
+ .long 3172720400
+ .long 183644160
+ .long 1068858008
+ .long 4287006742
+ .long 1022379728
+ .long 3639214080
+ .long 1068818300
+ .long 353762279
+ .long 3172980009
+ .long 3728416768
+ .long 1068778808
+ .long 1851367730
+ .long 1025486574
+ .long 3370094592
+ .long 1068739529
+ .long 4046594913
+ .long 3172567047
+ .long 1348407296
+ .long 1068700461
+ .long 143189675
+ .long 1025397632
+ .long 899403776
+ .long 1068661601
+ .long 3753687842
+ .long 3170772772
+ .long 1117708288
+ .long 1068622947
+ .long 1857340812
+ .long 3170782678
+ .long 1248276480
+ .long 1068584497
+ .long 1289858203
+ .long 1025222289
+ .long 683237376
+ .long 1068546249
+ .long 2356679608
+ .long 3171629170
+ .long 3253764096
+ .long 1068508200
+ .long 3267136556
+ .long 1018554987
+ .long 94478336
+ .long 1068441756
+ .long 1927868814
+ .long 3169378180
+ .long 3233144832
+ .long 1068366445
+ .long 2682188854
+ .long 1023964004
+ .long 2940297216
+ .long 1068291522
+ .long 275301289
+ .long 1023944679
+ .long 3677708288
+ .long 1068216982
+ .long 302658771
+ .long 1024465567
+ .long 1576968192
+ .long 1068142822
+ .long 3672035940
+ .long 3172254610
+ .long 1614069760
+ .long 1068069037
+ .long 480052905
+ .long 3172692062
+ .long 424435712
+ .long 1067995624
+ .long 2207869657
+ .long 3170965436
+ .long 3477782528
+ .long 1067922578
+ .long 2980661858
+ .long 3164990018
+ .long 3598401536
+ .long 1067849897
+ .long 1974393034
+ .long 3171357083
+ .long 2435235840
+ .long 1067777577
+ .long 1385289011
+ .long 1024615823
+ .long 1867333632
+ .long 1067705614
+ .long 3442236633
+ .long 1025334384
+ .long 3999301632
+ .long 1067634004
+ .long 3506472073
+ .long 1025132546
+ .long 2566971392
+ .long 1067562745
+ .long 1425757592
+ .long 3172358463
+ .long 112943104
+ .long 1067491833
+ .long 1693407156
+ .long 3172426603
+ .long 3079929856
+ .long 1067392159
+ .long 3999942455
+ .long 1018549369
+ .long 2443837440
+ .long 1067251701
+ .long 974534460
+ .long 1023963412
+ .long 359366656
+ .long 1067111917
+ .long 2204915018
+ .long 1013514416
+ .long 3564519424
+ .long 1066972799
+ .long 3977441659
+ .long 3170879860
+ .long 2011086848
+ .long 1066834343
+ .long 590145514
+ .long 1025390011
+ .long 3216982016
+ .long 1066696541
+ .long 3629120110
+ .long 1024330313
+ .long 2194128896
+ .long 1066559388
+ .long 2367098512
+ .long 3172260338
+ .long 2916220928
+ .long 1066422877
+ .long 2262431886
+ .long 1021229446
+ .long 2263941120
+ .long 1066172214
+ .long 3118507287
+ .long 1021484970
+ .long 3076292608
+ .long 1065901726
+ .long 1411737803
+ .long 3172957147
+ .long 1186136064
+ .long 1065632488
+ .long 3109349337
+ .long 1025397383
+ .long 3085303808
+ .long 1065364487
+ .long 584715031
+ .long 3172596519
+ .long 1821048832
+ .long 1064842211
+ .long 2182246895
+ .long 3172536214
+ .long 697368576
+ .long 1064311094
+ .long 3157561765
+ .long 3172716357
+ .long 894042112
+ .long 1063260131
+ .long 3237958154
+ .long 3172587292
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1352628224
+ .long 1066615827
+ .long 521319256
+ .long 1021308721
+ .long 3248877870
+ .long 1077250164
+ .long 1691676429
+ .long 3221787401
+ .long 945132465
+ .long 3223701783
+ .long 3700831335
+ .long 1073506818
+ .long 2141010593
+ .long 1075227551
+ .long 3698831637
+ .long 3220339442
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 4294959104
+ .long 0
+ .long 1071366144
+ .long 3207479560
+ .long 1062894188
+ .type static_const_table,@object
+ .size static_const_table,2160
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_pow.S b/libm/x86/e_pow.S
new file mode 100644
index 0000000..43e30d8
--- /dev/null
+++ b/libm/x86/e_pow.S
@@ -0,0 +1,4277 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// log2(x) calculation:
+//
+// Get B~1/mx based on the output of rcpps instruction (B0)
+// B = int((B0*LH*2^9+0.5))/2^9
+// LH is a short approximation for log2(e)
+//
+// Reduced argument, scaled by LH:
+// r=B*mx-LH (computed accurately in high and low parts)
+//
+// log2(x) result: k - log2(B) + p(r)
+// p(r) is a degree 8 polynomial
+// -log2(B) read from data table (high, low parts)
+// log2(x) is formed from high and low parts
+// For |x| in [1-1/32, 1+1/16), a slower but more accurate computation
+// based om the same table design is performed.
+//
+// Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8,
+// to filter out all potential OF/UF cases.
+// exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5
+// polynomial
+//
+// Special cases:
+// pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd
+// integer < 0.
+// pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and
+// not an odd integer.
+// pow(-0,y) = -0 for y an odd integer > 0.
+// pow(-0,y) = +0 for y > 0 and not an odd integer.
+// pow(-1,-INF) = 1.
+// pow(+1,y) = 1 for any y, even a NaN.
+// pow(x,-0) = 1 for any x, even a NaN.
+// pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and
+// finite non-integer y.
+// pow(x,-INF) = +INF for |x|<1.
+// pow(x,-INF) = +0 for |x|>1.
+// pow(x,+INF) = +0 for |x|<1.
+// pow(x,+INF) = +INF for |x|>1.
+// pow(-INF,y) = -0 for y an odd integer < 0.
+// pow(-INF,y) = +0 for y < 0 and not an odd integer.
+// pow(-INF,y) = -INF for y an odd integer > 0.
+// pow(-INF,y) = +INF for y > 0 and not an odd integer.
+// pow(+INF,y) = +0 for y <0.
+// pow(+INF,y) = +INF for y >0.
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin pow
+ENTRY(pow)
+# parameter 1: 8 + %ebp
+# parameter 2: 16 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 64(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ movsd 136(%esp), %xmm1
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movl $1069088768, %ecx
+ movd %ecx, %xmm7
+ movsd %xmm1, 16(%esp)
+ xorpd %xmm1, %xmm1
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm1
+ movsd %xmm0, 8(%esp)
+ movapd %xmm0, %xmm3
+ movl $8192, %edx
+ movd %edx, %xmm4
+ movapd 8240(%ebx), %xmm6
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ psllq $5, %xmm0
+ movsd 8256(%ebx), %xmm2
+ psrlq $34, %xmm0
+ movl %eax, %edx
+ andl $32752, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm3
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ psrlq $12, %xmm3
+ movl %esi, 24(%esp)
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ movl $0, %esi
+.L_2TAG_PACKET_1.0.2:
+ mulss %xmm7, %xmm0
+ movl $-1, %edx
+ subl $4, %ecx
+ shll %cl, %edx
+ movd %edx, %xmm5
+ orpd %xmm1, %xmm3
+ subl $16351, %eax
+ cmpl $1, %eax
+ jbe .L_2TAG_PACKET_2.0.2
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm3, %xmm5
+.L_2TAG_PACKET_3.0.2:
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ subl $1, %eax
+ sarl $4, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulpd %xmm0, %xmm5
+.L_2TAG_PACKET_4.0.2:
+ mulsd %xmm0, %xmm3
+ movapd 8272(%ebx), %xmm1
+ subsd %xmm2, %xmm5
+ movapd 8288(%ebx), %xmm4
+ movl %eax, %ecx
+ sarl $31, %eax
+ addl %eax, %ecx
+ xorl %ecx, %eax
+ addl $1, %eax
+ bsr %eax, %eax
+ unpcklpd %xmm3, %xmm5
+ movapd 8304(%ebx), %xmm6
+ addsd %xmm5, %xmm3
+ andl $16760832, %edx
+ shrl $10, %edx
+ addpd -3616(%ebx,%edx), %xmm5
+ movapd 8320(%ebx), %xmm0
+ pshufd $68, %xmm3, %xmm2
+ mulsd %xmm3, %xmm3
+ mulpd %xmm2, %xmm1
+ mulpd %xmm2, %xmm4
+ addsd %xmm7, %xmm5
+ mulsd %xmm3, %xmm2
+ addpd %xmm1, %xmm6
+ mulsd %xmm3, %xmm3
+ addpd %xmm4, %xmm0
+ movsd 16(%esp), %xmm1
+ movzwl 22(%esp), %ecx
+ pshufd $238, %xmm5, %xmm7
+ movsd 8368(%ebx), %xmm4
+ mulpd %xmm2, %xmm6
+ pshufd $68, %xmm3, %xmm3
+ mulpd %xmm2, %xmm0
+ shll $4, %eax
+ subl $15872, %eax
+ andl $32752, %ecx
+ addl %ecx, %eax
+ mulpd %xmm6, %xmm3
+ cmpl $624, %eax
+ jae .L_2TAG_PACKET_5.0.2
+ xorpd %xmm6, %xmm6
+ movl $17080, %edx
+ pinsrw $3, %edx, %xmm6
+ movapd %xmm1, %xmm2
+ andpd %xmm1, %xmm4
+ subsd %xmm4, %xmm1
+ mulsd %xmm5, %xmm4
+ addsd %xmm7, %xmm0
+ mulsd %xmm5, %xmm1
+ movapd %xmm6, %xmm7
+ addsd %xmm4, %xmm6
+ addpd %xmm0, %xmm3
+ movd %xmm6, %edx
+ subsd %xmm7, %xmm6
+ pshufd $238, %xmm3, %xmm0
+ subsd %xmm6, %xmm4
+ addsd %xmm3, %xmm0
+ movl %edx, %ecx
+ andl $255, %edx
+ addl %edx, %edx
+ movapd 8384(%ebx,%edx,8), %xmm5
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ movapd 12480(%ebx), %xmm7
+ movapd 12496(%ebx), %xmm3
+ shll $12, %ecx
+ xorl %esi, %ecx
+ andl $-1048576, %ecx
+ movd %ecx, %xmm6
+ addsd %xmm4, %xmm2
+ movsd 12512(%ebx), %xmm1
+ pshufd $68, %xmm2, %xmm0
+ pshufd $68, %xmm2, %xmm4
+ mulpd %xmm0, %xmm0
+ movl 24(%esp), %esi
+ mulpd %xmm4, %xmm7
+ pshufd $17, %xmm6, %xmm6
+ mulsd %xmm2, %xmm1
+ mulsd %xmm0, %xmm0
+ paddd %xmm6, %xmm5
+ addpd %xmm7, %xmm3
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ mulpd %xmm3, %xmm0
+ addsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm3
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm0
+ addsd %xmm5, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_7.0.2:
+ movsd 128(%esp), %xmm0
+ movsd 136(%esp), %xmm1
+ mulsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_0.0.2:
+ addl $16, %eax
+ movl $32752, %edx
+ andl %eax, %edx
+ cmpl $32752, %edx
+ je .L_2TAG_PACKET_8.0.2
+ testl $32768, %eax
+ jne .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_10.0.2:
+ movl 16(%esp), %ecx
+ xorl %edx, %edx
+ testl %ecx, %ecx
+ movl $1, %ecx
+ cmovne %ecx, %edx
+ orl 20(%esp), %edx
+ cmpl $1072693248, %edx
+ je .L_2TAG_PACKET_7.0.2
+ movsd 8(%esp), %xmm0
+ movsd 8(%esp), %xmm3
+ movd %xmm3, %edx
+ psrlq $32, %xmm3
+ movd %xmm3, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_11.0.2
+ xorpd %xmm3, %xmm3
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm3
+ mulsd %xmm3, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movapd %xmm0, %xmm3
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psllq $5, %xmm0
+ movsd 8256(%ebx), %xmm2
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm3
+ movapd 8240(%ebx), %xmm6
+ psrlq $12, %xmm3
+ mulss %xmm7, %xmm0
+ movl $-1024, %edx
+ movd %edx, %xmm5
+ orpd %xmm1, %xmm3
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm3, %xmm5
+ movl $0, %esi
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ andl $32752, %eax
+ subl $18416, %eax
+ sarl $4, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_12.0.2:
+ movl 16(%esp), %ecx
+ xorl %edx, %edx
+ testl %ecx, %ecx
+ movl $1, %ecx
+ cmovne %ecx, %edx
+ orl 20(%esp), %edx
+ cmpl $1072693248, %edx
+ je .L_2TAG_PACKET_7.0.2
+ movsd 8(%esp), %xmm0
+ movsd 8(%esp), %xmm3
+ movd %xmm3, %edx
+ psrlq $32, %xmm3
+ movd %xmm3, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_11.0.2
+ xorpd %xmm3, %xmm3
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm3
+ mulsd %xmm3, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movapd %xmm0, %xmm3
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psllq $5, %xmm0
+ movsd 8256(%ebx), %xmm2
+ psrlq $34, %xmm0
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm3
+ movapd 8240(%ebx), %xmm6
+ psrlq $12, %xmm3
+ mulss %xmm7, %xmm0
+ movl $-1024, %edx
+ movd %edx, %xmm5
+ orpd %xmm1, %xmm3
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm3, %xmm5
+ movl $-2147483648, %esi
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ andl $32752, %eax
+ subl $18416, %eax
+ sarl $4, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_13.0.2
+ cmpl $736, %eax
+ jae .L_2TAG_PACKET_14.0.2
+.L_2TAG_PACKET_15.0.2:
+ addsd %xmm7, %xmm0
+ movsd 12544(%ebx), %xmm2
+ addpd %xmm0, %xmm3
+ xorpd %xmm6, %xmm6
+ movl $17080, %eax
+ pinsrw $3, %eax, %xmm6
+ pshufd $238, %xmm3, %xmm0
+ addsd %xmm3, %xmm0
+ movapd %xmm5, %xmm3
+ addsd %xmm0, %xmm5
+ movapd %xmm2, %xmm4
+ subsd %xmm5, %xmm3
+ movapd %xmm5, %xmm7
+ andpd %xmm2, %xmm5
+ movapd %xmm1, %xmm2
+ andpd %xmm1, %xmm4
+ subsd %xmm5, %xmm7
+ addsd %xmm3, %xmm0
+ subsd %xmm4, %xmm1
+ mulsd %xmm5, %xmm4
+ addsd %xmm7, %xmm0
+ mulsd %xmm0, %xmm2
+ movapd %xmm6, %xmm7
+ mulsd %xmm5, %xmm1
+ addsd %xmm4, %xmm6
+ movd %xmm6, %eax
+ subsd %xmm7, %xmm6
+ addsd %xmm1, %xmm2
+ movapd 12480(%ebx), %xmm7
+ movapd 12496(%ebx), %xmm3
+ subsd %xmm6, %xmm4
+ pextrw $3, %xmm6, %edx
+ movl %eax, %ecx
+ andl $255, %eax
+ addl %eax, %eax
+ movapd 8384(%ebx,%eax,8), %xmm5
+ addsd %xmm4, %xmm2
+ sarl $8, %ecx
+ movl %ecx, %eax
+ sarl $1, %ecx
+ subl %ecx, %eax
+ shll $20, %ecx
+ xorl %esi, %ecx
+ movd %ecx, %xmm6
+ movsd 12512(%ebx), %xmm1
+ andl $32767, %edx
+ cmpl $16529, %edx
+ ja .L_2TAG_PACKET_14.0.2
+ pshufd $68, %xmm2, %xmm0
+ pshufd $68, %xmm2, %xmm4
+ mulpd %xmm0, %xmm0
+ mulpd %xmm4, %xmm7
+ pshufd $17, %xmm6, %xmm6
+ mulsd %xmm2, %xmm1
+ mulsd %xmm0, %xmm0
+ paddd %xmm6, %xmm5
+ addpd %xmm7, %xmm3
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ mulpd %xmm3, %xmm0
+ addsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm3
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ shll $4, %eax
+ xorpd %xmm4, %xmm4
+ addl $16368, %eax
+ pinsrw $3, %eax, %xmm4
+ addsd %xmm1, %xmm0
+ movl 24(%esp), %esi
+ addsd %xmm3, %xmm0
+ movapd %xmm0, %xmm1
+ addsd %xmm5, %xmm0
+ mulsd %xmm4, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ je .L_2TAG_PACKET_16.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_18.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_8.0.2:
+ movsd 16(%esp), %xmm1
+ movsd 8(%esp), %xmm0
+ movapd %xmm0, %xmm2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_19.0.2
+ addsd %xmm0, %xmm0
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_20.0.2
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_20.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ movl $29, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_22.0.2:
+ movsd 16(%esp), %xmm0
+ addpd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_19.0.2:
+ movd %xmm1, %eax
+ movapd %xmm1, %xmm2
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_23.0.2
+ pextrw $3, %xmm2, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ jne .L_2TAG_PACKET_24.0.2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ jne .L_2TAG_PACKET_22.0.2
+.L_2TAG_PACKET_24.0.2:
+ pextrw $3, %xmm0, %eax
+ testl $32768, %eax
+ jne .L_2TAG_PACKET_25.0.2
+ testl $-2147483648, %ecx
+ jne .L_2TAG_PACKET_26.0.2
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_27.0.2:
+ movsd 16(%esp), %xmm1
+ movd %xmm1, %eax
+ testl $1, %eax
+ jne .L_2TAG_PACKET_28.0.2
+ testl $2, %eax
+ jne .L_2TAG_PACKET_29.0.2
+ jmp .L_2TAG_PACKET_28.0.2
+.L_2TAG_PACKET_25.0.2:
+ shrl $20, %ecx
+ andl $2047, %ecx
+ cmpl $1075, %ecx
+ ja .L_2TAG_PACKET_28.0.2
+ je .L_2TAG_PACKET_30.0.2
+ cmpl $1074, %ecx
+ ja .L_2TAG_PACKET_27.0.2
+ cmpl $1023, %ecx
+ jb .L_2TAG_PACKET_28.0.2
+ movsd 16(%esp), %xmm1
+ movl $17208, %eax
+ xorpd %xmm3, %xmm3
+ pinsrw $3, %eax, %xmm3
+ movapd %xmm3, %xmm4
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ jne .L_2TAG_PACKET_28.0.2
+ movd %xmm3, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_28.0.2
+.L_2TAG_PACKET_29.0.2:
+ movsd 16(%esp), %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32768, %eax
+ je .L_2TAG_PACKET_18.0.2
+ xorpd %xmm0, %xmm0
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_28.0.2:
+ movsd 16(%esp), %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32768, %eax
+ jne .L_2TAG_PACKET_26.0.2
+.L_2TAG_PACKET_31.0.2:
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_30.0.2:
+ movsd 16(%esp), %xmm1
+ movd %xmm1, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_28.0.2
+ jmp .L_2TAG_PACKET_29.0.2
+.L_2TAG_PACKET_32.0.2:
+ movd %xmm1, %eax
+ psrlq $20, %xmm1
+ movd %xmm1, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_33.0.2
+ movsd 16(%esp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_33.0.2:
+ movsd 8(%esp), %xmm0
+ pextrw $3, %xmm0, %eax
+ cmpl $49136, %eax
+ jne .L_2TAG_PACKET_34.0.2
+ movd %xmm0, %ecx
+ psrlq $20, %xmm0
+ movd %xmm0, %edx
+ orl %edx, %ecx
+ jne .L_2TAG_PACKET_34.0.2
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_34.0.2:
+ movsd 16(%esp), %xmm1
+ andl $32752, %eax
+ subl $16368, %eax
+ pextrw $3, %xmm1, %edx
+ xorpd %xmm0, %xmm0
+ xorl %edx, %eax
+ andl $32768, %eax
+ jne .L_2TAG_PACKET_18.0.2
+ movl $32752, %ecx
+ pinsrw $3, %ecx, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_35.0.2:
+ movd %xmm1, %eax
+ cmpl $17184, %edx
+ ja .L_2TAG_PACKET_36.0.2
+ testl $1, %eax
+ jne .L_2TAG_PACKET_37.0.2
+ testl $2, %eax
+ je .L_2TAG_PACKET_38.0.2
+ jmp .L_2TAG_PACKET_39.0.2
+.L_2TAG_PACKET_36.0.2:
+ testl $1, %eax
+ je .L_2TAG_PACKET_38.0.2
+ jmp .L_2TAG_PACKET_39.0.2
+.L_2TAG_PACKET_9.0.2:
+ movsd 8(%esp), %xmm2
+ movd %xmm2, %eax
+ psrlq $31, %xmm2
+ movd %xmm2, %ecx
+ orl %ecx, %eax
+ je .L_2TAG_PACKET_11.0.2
+ movsd 16(%esp), %xmm1
+ pextrw $3, %xmm1, %edx
+ movd %xmm1, %eax
+ movapd %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ addl %ecx, %ecx
+ orl %eax, %ecx
+ je .L_2TAG_PACKET_40.0.2
+ andl $32752, %edx
+ cmpl $32752, %edx
+ je .L_2TAG_PACKET_32.0.2
+ cmpl $17200, %edx
+ ja .L_2TAG_PACKET_38.0.2
+ cmpl $17184, %edx
+ jae .L_2TAG_PACKET_35.0.2
+ cmpl $16368, %edx
+ jb .L_2TAG_PACKET_37.0.2
+ movl $17208, %eax
+ xorpd %xmm2, %xmm2
+ pinsrw $3, %eax, %xmm2
+ movapd %xmm2, %xmm4
+ addsd %xmm1, %xmm2
+ subsd %xmm2, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32767, %eax
+ jne .L_2TAG_PACKET_37.0.2
+ movd %xmm2, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_38.0.2
+.L_2TAG_PACKET_39.0.2:
+ xorpd %xmm1, %xmm1
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm1
+ movsd 8256(%ebx), %xmm2
+ movsd 8(%esp), %xmm4
+ pextrw $3, %xmm4, %eax
+ movl $8192, %edx
+ movd %edx, %xmm4
+ andl $32767, %eax
+ subl $16, %eax
+ jl .L_2TAG_PACKET_12.0.2
+ movl %eax, %edx
+ andl $32752, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ movl $-2147483648, %esi
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_37.0.2:
+ xorpd %xmm1, %xmm1
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ xorpd %xmm0, %xmm0
+ mulsd %xmm1, %xmm0
+ movl $28, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_38.0.2:
+ xorpd %xmm1, %xmm1
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm1
+ movsd 8256(%ebx), %xmm2
+ movsd 8(%esp), %xmm4
+ pextrw $3, %xmm4, %eax
+ movl $8192, %edx
+ movd %edx, %xmm4
+ andl $32767, %eax
+ subl $16, %eax
+ jl .L_2TAG_PACKET_10.0.2
+ movl %eax, %edx
+ andl $32752, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ movl $0, %esi
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_23.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_26.0.2:
+ xorpd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_13.0.2:
+ addl $384, %eax
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_41.0.2
+ mulsd %xmm1, %xmm5
+ addsd %xmm7, %xmm0
+ shrl $31, %esi
+ addpd %xmm0, %xmm3
+ pshufd $238, %xmm3, %xmm0
+ addsd %xmm0, %xmm3
+ movsd 12528(%ebx,%esi,8), %xmm4
+ mulsd %xmm3, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ shll $15, %esi
+ orl %esi, %eax
+ pinsrw $3, %eax, %xmm0
+ addsd %xmm1, %xmm5
+ movl 24(%esp), %esi
+ mulsd %xmm4, %xmm5
+ addsd %xmm5, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_41.0.2:
+ movl 24(%esp), %esi
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_40.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_42.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ movl $26, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_11.0.2:
+ movsd 16(%esp), %xmm1
+ movapd %xmm1, %xmm2
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ jne .L_2TAG_PACKET_43.0.2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ jne .L_2TAG_PACKET_22.0.2
+.L_2TAG_PACKET_43.0.2:
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_42.0.2
+ shrl $21, %edx
+ cmpl $1075, %edx
+ ja .L_2TAG_PACKET_44.0.2
+ je .L_2TAG_PACKET_45.0.2
+ cmpl $1023, %edx
+ jb .L_2TAG_PACKET_44.0.2
+ movsd 16(%esp), %xmm1
+ movl $17208, %eax
+ xorpd %xmm3, %xmm3
+ pinsrw $3, %eax, %xmm3
+ movapd %xmm3, %xmm4
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ jne .L_2TAG_PACKET_44.0.2
+ movd %xmm3, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_44.0.2
+.L_2TAG_PACKET_46.0.2:
+ movsd 8(%esp), %xmm0
+ testl $-2147483648, %ecx
+ jne .L_2TAG_PACKET_47.0.2
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_45.0.2:
+ movsd 16(%esp), %xmm1
+ movd %xmm1, %eax
+ testl $1, %eax
+ jne .L_2TAG_PACKET_46.0.2
+.L_2TAG_PACKET_44.0.2:
+ testl $-2147483648, %ecx
+ je .L_2TAG_PACKET_26.0.2
+ xorpd %xmm0, %xmm0
+.L_2TAG_PACKET_47.0.2:
+ movl $16368, %eax
+ xorpd %xmm1, %xmm1
+ pinsrw $3, %eax, %xmm1
+ divsd %xmm0, %xmm1
+ movapd %xmm1, %xmm0
+ movl $27, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_14.0.2:
+ movsd 8(%esp), %xmm2
+ movsd 16(%esp), %xmm6
+ pextrw $3, %xmm2, %eax
+ pextrw $3, %xmm6, %edx
+ movl $32752, %ecx
+ andl %edx, %ecx
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_48.0.2
+ andl $32752, %eax
+ subl $16368, %eax
+ xorl %eax, %edx
+ testl $32768, %edx
+ jne .L_2TAG_PACKET_49.0.2
+.L_2TAG_PACKET_50.0.2:
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ shrl $16, %esi
+ orl %esi, %eax
+ pinsrw $3, %eax, %xmm1
+ movl 24(%esp), %esi
+ mulsd %xmm1, %xmm0
+.L_2TAG_PACKET_17.0.2:
+ movl $24, %edx
+.L_2TAG_PACKET_21.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_49.0.2:
+ movl $16, %eax
+ pinsrw $3, %eax, %xmm0
+ mulsd %xmm0, %xmm0
+ testl $-2147483648, %esi
+ je .L_2TAG_PACKET_51.0.2
+ movsd 12560(%ebx), %xmm2
+ xorpd %xmm2, %xmm0
+.L_2TAG_PACKET_51.0.2:
+ movl 24(%esp), %esi
+ movl $25, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_16.0.2:
+ pextrw $3, %xmm5, %ecx
+ pextrw $3, %xmm4, %edx
+ movl $-1, %eax
+ andl $32752, %ecx
+ subl $16368, %ecx
+ andl $32752, %edx
+ addl %ecx, %edx
+ movl $-31, %ecx
+ sarl $4, %edx
+ subl %edx, %ecx
+ jle .L_2TAG_PACKET_52.0.2
+ cmpl $20, %ecx
+ ja .L_2TAG_PACKET_53.0.2
+ shll %cl, %eax
+.L_2TAG_PACKET_52.0.2:
+ movd %eax, %xmm0
+ psllq $32, %xmm0
+ andpd %xmm5, %xmm0
+ subsd %xmm0, %xmm5
+ addsd %xmm1, %xmm5
+ mulsd %xmm4, %xmm0
+ mulsd %xmm4, %xmm5
+ addsd %xmm5, %xmm0
+.L_2TAG_PACKET_53.0.2:
+ movl $25, %edx
+ jmp .L_2TAG_PACKET_21.0.2
+.L_2TAG_PACKET_2.0.2:
+ movzwl 22(%esp), %ecx
+ movl $-2147483648, %edx
+ movd %edx, %xmm1
+ xorpd %xmm7, %xmm7
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ paddq %xmm3, %xmm1
+ andpd %xmm1, %xmm5
+ andl $32752, %ecx
+ cmpl $16560, %ecx
+ jb .L_2TAG_PACKET_3.0.2
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ addl $16351, %eax
+ shrl $4, %eax
+ subl $1022, %eax
+ cvtsi2sdl %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ movsd (%ebx), %xmm4
+ mulsd %xmm0, %xmm3
+ movsd (%ebx), %xmm6
+ subsd %xmm2, %xmm5
+ movsd 8(%ebx), %xmm1
+ pshufd $68, %xmm3, %xmm2
+ unpcklpd %xmm3, %xmm5
+ addsd %xmm5, %xmm3
+ movsd 8(%ebx), %xmm0
+ andl $16760832, %edx
+ shrl $10, %edx
+ addpd -3616(%ebx,%edx), %xmm7
+ mulsd %xmm5, %xmm4
+ mulsd %xmm5, %xmm0
+ mulsd %xmm2, %xmm6
+ mulsd %xmm2, %xmm1
+ movapd %xmm5, %xmm2
+ mulsd %xmm5, %xmm4
+ addsd %xmm0, %xmm5
+ movapd %xmm7, %xmm0
+ addsd %xmm3, %xmm2
+ addsd %xmm5, %xmm7
+ mulsd %xmm2, %xmm6
+ subsd %xmm7, %xmm0
+ movapd %xmm7, %xmm2
+ addsd %xmm4, %xmm7
+ addsd %xmm5, %xmm0
+ subsd %xmm7, %xmm2
+ addsd %xmm2, %xmm4
+ pshufd $238, %xmm5, %xmm2
+ movapd %xmm7, %xmm5
+ addsd %xmm2, %xmm7
+ addsd %xmm0, %xmm4
+ movapd 8272(%ebx), %xmm0
+ subsd %xmm7, %xmm5
+ addsd %xmm4, %xmm6
+ movapd %xmm7, %xmm4
+ addsd %xmm2, %xmm5
+ addsd %xmm1, %xmm7
+ movapd 8336(%ebx), %xmm2
+ subsd %xmm7, %xmm4
+ addsd %xmm5, %xmm6
+ addsd %xmm1, %xmm4
+ pshufd $238, %xmm7, %xmm5
+ movapd %xmm7, %xmm1
+ addsd %xmm5, %xmm7
+ subsd %xmm7, %xmm1
+ addsd %xmm5, %xmm1
+ movapd 8352(%ebx), %xmm5
+ pshufd $68, %xmm3, %xmm3
+ addsd %xmm4, %xmm6
+ addsd %xmm1, %xmm6
+ movapd 8304(%ebx), %xmm1
+ mulpd %xmm3, %xmm0
+ mulpd %xmm3, %xmm2
+ pshufd $68, %xmm3, %xmm4
+ mulpd %xmm3, %xmm3
+ addpd %xmm1, %xmm0
+ addpd %xmm2, %xmm5
+ mulsd %xmm3, %xmm4
+ movsd 16(%ebx), %xmm2
+ mulpd %xmm3, %xmm3
+ movsd 16(%esp), %xmm1
+ movzwl 22(%esp), %ecx
+ mulpd %xmm4, %xmm0
+ pextrw $3, %xmm7, %eax
+ mulpd %xmm4, %xmm5
+ mulpd %xmm3, %xmm0
+ movsd 8376(%ebx), %xmm4
+ andpd %xmm7, %xmm2
+ addsd %xmm6, %xmm5
+ subsd %xmm2, %xmm7
+ addpd %xmm0, %xmm5
+ andl $32752, %eax
+ subl $16368, %eax
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_48.0.2
+ addl %eax, %ecx
+ cmpl $16576, %ecx
+ jae .L_2TAG_PACKET_54.0.2
+ pshufd $238, %xmm5, %xmm0
+ andpd %xmm1, %xmm4
+ movapd %xmm1, %xmm3
+ addsd %xmm0, %xmm5
+ subsd %xmm4, %xmm1
+ xorpd %xmm6, %xmm6
+ movl $17080, %edx
+ pinsrw $3, %edx, %xmm6
+ addsd %xmm5, %xmm7
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm1
+ movapd %xmm6, %xmm5
+ mulsd %xmm7, %xmm3
+ addsd %xmm4, %xmm6
+ addsd %xmm3, %xmm1
+ movapd 12480(%ebx), %xmm7
+ movd %xmm6, %edx
+ subsd %xmm5, %xmm6
+ movapd 12496(%ebx), %xmm3
+ movsd 12512(%ebx), %xmm2
+ subsd %xmm6, %xmm4
+ movl %edx, %ecx
+ andl $255, %edx
+ addl %edx, %edx
+ movapd 8384(%ebx,%edx,8), %xmm5
+ addsd %xmm1, %xmm4
+ pextrw $3, %xmm6, %edx
+ shrl $8, %ecx
+ movl %ecx, %eax
+ shrl $1, %ecx
+ subl %ecx, %eax
+ shll $20, %ecx
+ movd %ecx, %xmm6
+ pshufd $68, %xmm4, %xmm0
+ pshufd $68, %xmm4, %xmm1
+ mulpd %xmm0, %xmm0
+ mulpd %xmm1, %xmm7
+ pshufd $17, %xmm6, %xmm6
+ mulsd %xmm4, %xmm2
+ andl $32767, %edx
+ cmpl $16529, %edx
+ ja .L_2TAG_PACKET_14.0.2
+ mulsd %xmm0, %xmm0
+ paddd %xmm6, %xmm5
+ addpd %xmm7, %xmm3
+ mulsd %xmm5, %xmm2
+ pshufd $238, %xmm5, %xmm6
+ mulpd %xmm3, %xmm0
+ addsd %xmm6, %xmm2
+ pshufd $238, %xmm0, %xmm3
+ addl $1023, %eax
+ shll $20, %eax
+ orl %esi, %eax
+ movd %eax, %xmm4
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ addsd %xmm2, %xmm0
+ psllq $32, %xmm4
+ addsd %xmm3, %xmm0
+ movapd %xmm0, %xmm1
+ addsd %xmm5, %xmm0
+ movl 24(%esp), %esi
+ mulsd %xmm4, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ je .L_2TAG_PACKET_16.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_55.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_48.0.2:
+ movl 24(%esp), %esi
+.L_2TAG_PACKET_56.0.2:
+ movsd 8(%esp), %xmm0
+ movsd 16(%esp), %xmm1
+ addsd %xmm1, %xmm1
+ xorpd %xmm2, %xmm2
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm2
+ addsd %xmm0, %xmm2
+ pextrw $3, %xmm2, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_18.0.2
+ movd %xmm1, %edx
+ movapd %xmm1, %xmm3
+ psrlq $20, %xmm3
+ movd %xmm3, %ecx
+ orl %edx, %ecx
+ je .L_2TAG_PACKET_57.0.2
+ addsd %xmm1, %xmm1
+ movapd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_57.0.2:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ pextrw $3, %xmm1, %edx
+ xorpd %xmm0, %xmm0
+ subl $16368, %eax
+ xorl %edx, %eax
+ testl $32768, %eax
+ jne .L_2TAG_PACKET_18.0.2
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm0
+ jmp .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_54.0.2:
+ pextrw $3, %xmm1, %eax
+ pextrw $3, %xmm2, %ecx
+ xorl %ecx, %eax
+ testl $32768, %eax
+ je .L_2TAG_PACKET_50.0.2
+ jmp .L_2TAG_PACKET_49.0.2
+.L_2TAG_PACKET_6.0.2:
+ movl 64(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(pow)
+# -- End pow
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 3218479616
+ .long 0
+ .long 3210587105
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 4294965248
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 536870912
+ .long 1072689162
+ .long 2523013013
+ .long 1046157398
+ .long 3758096384
+ .long 1072685081
+ .long 3851513758
+ .long 3190968952
+ .long 0
+ .long 1072681007
+ .long 2241466466
+ .long 1046044599
+ .long 3221225472
+ .long 1072676937
+ .long 2990928271
+ .long 3193084984
+ .long 3758096384
+ .long 1072672873
+ .long 2905112743
+ .long 3192918576
+ .long 1610612736
+ .long 1072668815
+ .long 3370591264
+ .long 1046051793
+ .long 2147483648
+ .long 1072664762
+ .long 3272361216
+ .long 3193793653
+ .long 3758096384
+ .long 1072660714
+ .long 46546755
+ .long 1043206936
+ .long 3221225472
+ .long 1072656672
+ .long 3017067724
+ .long 3192177962
+ .long 0
+ .long 1072652636
+ .long 3688436631
+ .long 3192814956
+ .long 2684354560
+ .long 1072648604
+ .long 1707461992
+ .long 3193056712
+ .long 2684354560
+ .long 1072644578
+ .long 1188114540
+ .long 3193603086
+ .long 3758096384
+ .long 1072640557
+ .long 3533180564
+ .long 1045459375
+ .long 2684354560
+ .long 1072636542
+ .long 2000337630
+ .long 3193475557
+ .long 2684354560
+ .long 1072632532
+ .long 3698062443
+ .long 3193752766
+ .long 3758096384
+ .long 1072628527
+ .long 3161606138
+ .long 3190532995
+ .long 2147483648
+ .long 1072624528
+ .long 3165265478
+ .long 3193158459
+ .long 1610612736
+ .long 1072620534
+ .long 1600940077
+ .long 3193226777
+ .long 2147483648
+ .long 1072616545
+ .long 1363272552
+ .long 3192614278
+ .long 3758096384
+ .long 1072612561
+ .long 3966209910
+ .long 3191249654
+ .long 2147483648
+ .long 1072608583
+ .long 1093672789
+ .long 3190637330
+ .long 1610612736
+ .long 1072604610
+ .long 1735239357
+ .long 3192753616
+ .long 1610612736
+ .long 1072600642
+ .long 1470665156
+ .long 1045559697
+ .long 2684354560
+ .long 1072596679
+ .long 3840624926
+ .long 1045928953
+ .long 536870912
+ .long 1072592722
+ .long 4259072556
+ .long 3191035622
+ .long 3221225472
+ .long 1072588769
+ .long 3613088753
+ .long 3192165681
+ .long 2147483648
+ .long 1072584822
+ .long 3175234446
+ .long 1039486948
+ .long 1610612736
+ .long 1072580880
+ .long 856576441
+ .long 1045702812
+ .long 2147483648
+ .long 1072576943
+ .long 2253498719
+ .long 3193285334
+ .long 2684354560
+ .long 1072573011
+ .long 1587070728
+ .long 3190801577
+ .long 3758096384
+ .long 1072569084
+ .long 159986317
+ .long 1042519436
+ .long 1073741824
+ .long 1072565163
+ .long 3999541949
+ .long 3192020440
+ .long 2684354560
+ .long 1072561246
+ .long 3281310262
+ .long 1045586786
+ .long 536870912
+ .long 1072557335
+ .long 3775179406
+ .long 1045226055
+ .long 3221225472
+ .long 1072553428
+ .long 643472356
+ .long 3193681786
+ .long 1073741824
+ .long 1072549527
+ .long 248169775
+ .long 1045068977
+ .long 3758096384
+ .long 1072545630
+ .long 307016632
+ .long 1042640932
+ .long 2147483648
+ .long 1072541739
+ .long 3872718526
+ .long 3189781486
+ .long 536870912
+ .long 1072537853
+ .long 969711630
+ .long 3191724732
+ .long 3221225472
+ .long 1072533971
+ .long 4018820394
+ .long 3193189264
+ .long 1073741824
+ .long 1072530095
+ .long 3102233092
+ .long 1045510224
+ .long 3758096384
+ .long 1072526223
+ .long 1029307912
+ .long 3193812776
+ .long 1073741824
+ .long 1072522357
+ .long 984083153
+ .long 1045987403
+ .long 3221225472
+ .long 1072518495
+ .long 4171455401
+ .long 3193084080
+ .long 0
+ .long 1072514639
+ .long 2592660757
+ .long 1046121691
+ .long 1073741824
+ .long 1072510787
+ .long 2964365712
+ .long 1046054453
+ .long 2147483648
+ .long 1072506940
+ .long 3792777877
+ .long 3193704729
+ .long 2147483648
+ .long 1072503098
+ .long 2948536104
+ .long 3192467100
+ .long 1610612736
+ .long 1072499261
+ .long 3836005619
+ .long 1041873166
+ .long 536870912
+ .long 1072495429
+ .long 3124543160
+ .long 1044409168
+ .long 3221225472
+ .long 1072491601
+ .long 286227933
+ .long 1041065990
+ .long 1073741824
+ .long 1072487779
+ .long 2111296776
+ .long 3193604419
+ .long 2147483648
+ .long 1072483961
+ .long 2606822001
+ .long 3192940394
+ .long 2147483648
+ .long 1072480148
+ .long 194696800
+ .long 1046026063
+ .long 1610612736
+ .long 1072476340
+ .long 8535452
+ .long 1046200178
+ .long 536870912
+ .long 1072472537
+ .long 950463625
+ .long 3192731897
+ .long 2147483648
+ .long 1072468738
+ .long 973831566
+ .long 1045683197
+ .long 3221225472
+ .long 1072464944
+ .long 3330435892
+ .long 3190277577
+ .long 3221225472
+ .long 1072461155
+ .long 208692097
+ .long 3193517651
+ .long 1610612736
+ .long 1072457371
+ .long 2113097415
+ .long 1044781749
+ .long 3758096384
+ .long 1072453591
+ .long 1088808936
+ .long 3193716142
+ .long 0
+ .long 1072449817
+ .long 1443002127
+ .long 3193250205
+ .long 3221225472
+ .long 1072446046
+ .long 3967357419
+ .long 1046109477
+ .long 1610612736
+ .long 1072442281
+ .long 3013517861
+ .long 3193159691
+ .long 2147483648
+ .long 1072438520
+ .long 2524586286
+ .long 1046121951
+ .long 1610612736
+ .long 1072434764
+ .long 1476892861
+ .long 1046434731
+ .long 0
+ .long 1072431013
+ .long 3089640950
+ .long 3192305780
+ .long 536870912
+ .long 1072427266
+ .long 3812255529
+ .long 1045730879
+ .long 0
+ .long 1072423524
+ .long 995354762
+ .long 3191528673
+ .long 1610612736
+ .long 1072419786
+ .long 3260567684
+ .long 1046273695
+ .long 2147483648
+ .long 1072416053
+ .long 2738210286
+ .long 3191471516
+ .long 536870912
+ .long 1072412325
+ .long 1931849805
+ .long 1044560405
+ .long 1610612736
+ .long 1072408601
+ .long 358896655
+ .long 1044029237
+ .long 1073741824
+ .long 1072404882
+ .long 2214589842
+ .long 3193202126
+ .long 2684354560
+ .long 1072401167
+ .long 3118097363
+ .long 3192592906
+ .long 2147483648
+ .long 1072397457
+ .long 1835998884
+ .long 1045788247
+ .long 0
+ .long 1072393752
+ .long 1585488319
+ .long 1045289910
+ .long 0
+ .long 1072390051
+ .long 480160949
+ .long 1046030455
+ .long 2684354560
+ .long 1072386354
+ .long 1832959667
+ .long 3193013644
+ .long 2684354560
+ .long 1072382662
+ .long 3611346555
+ .long 1044544210
+ .long 1073741824
+ .long 1072378975
+ .long 2749418734
+ .long 3193712580
+ .long 1073741824
+ .long 1072375292
+ .long 2390043472
+ .long 3191710658
+ .long 3221225472
+ .long 1072371613
+ .long 2828199902
+ .long 1042265217
+ .long 3221225472
+ .long 1072367939
+ .long 569209321
+ .long 3191230982
+ .long 536870912
+ .long 1072364270
+ .long 236159139
+ .long 1046240123
+ .long 536870912
+ .long 1072360605
+ .long 1010656270
+ .long 3193813968
+ .long 1610612736
+ .long 1072356944
+ .long 2409080597
+ .long 1044025029
+ .long 536870912
+ .long 1072353288
+ .long 598419513
+ .long 1043327370
+ .long 1073741824
+ .long 1072349636
+ .long 4105950479
+ .long 1045747958
+ .long 3758096384
+ .long 1072345988
+ .long 343243853
+ .long 3192420172
+ .long 3221225472
+ .long 1072342345
+ .long 2088439530
+ .long 1046172091
+ .long 536870912
+ .long 1072338707
+ .long 4117721107
+ .long 1043882496
+ .long 3758096384
+ .long 1072335072
+ .long 3192032958
+ .long 3192998645
+ .long 3758096384
+ .long 1072331442
+ .long 2366522518
+ .long 1045401957
+ .long 1610612736
+ .long 1072327817
+ .long 3685533141
+ .long 3193701947
+ .long 536870912
+ .long 1072324196
+ .long 1058658672
+ .long 3193572492
+ .long 536870912
+ .long 1072320579
+ .long 166346347
+ .long 1045456348
+ .long 2147483648
+ .long 1072316966
+ .long 2027889772
+ .long 1046349302
+ .long 1073741824
+ .long 1072313358
+ .long 1079497888
+ .long 1044585259
+ .long 1073741824
+ .long 1072309754
+ .long 2189851573
+ .long 1045132990
+ .long 2684354560
+ .long 1072306154
+ .long 2486629386
+ .long 3193613625
+ .long 536870912
+ .long 1072302559
+ .long 1263686579
+ .long 1044789259
+ .long 0
+ .long 1072298968
+ .long 2412061798
+ .long 3191369627
+ .long 536870912
+ .long 1072295381
+ .long 584315716
+ .long 3193144135
+ .long 1610612736
+ .long 1072291798
+ .long 449000738
+ .long 1046330451
+ .long 0
+ .long 1072288220
+ .long 3938320157
+ .long 1044446220
+ .long 3758096384
+ .long 1072284645
+ .long 2949844595
+ .long 3193462371
+ .long 3758096384
+ .long 1072281075
+ .long 2771329642
+ .long 3192121593
+ .long 536870912
+ .long 1072277510
+ .long 3971508621
+ .long 3193002806
+ .long 2147483648
+ .long 1072273948
+ .long 4071942301
+ .long 1044952619
+ .long 536870912
+ .long 1072270391
+ .long 2090502395
+ .long 1044660556
+ .long 0
+ .long 1072266838
+ .long 3657520961
+ .long 3193770938
+ .long 3758096384
+ .long 1072263288
+ .long 1608175110
+ .long 1045543239
+ .long 0
+ .long 1072259744
+ .long 2506924180
+ .long 1045530501
+ .long 1073741824
+ .long 1072256203
+ .long 18238493
+ .long 1046305623
+ .long 3221225472
+ .long 1072252666
+ .long 3862640487
+ .long 3192882407
+ .long 1073741824
+ .long 1072249134
+ .long 3850158761
+ .long 1043656099
+ .long 3758096384
+ .long 1072245605
+ .long 2356524356
+ .long 1045915296
+ .long 3221225472
+ .long 1072242081
+ .long 936497287
+ .long 3193842353
+ .long 2147483648
+ .long 1072238561
+ .long 2840845344
+ .long 1046454771
+ .long 2147483648
+ .long 1072235045
+ .long 3688100713
+ .long 1044895451
+ .long 2684354560
+ .long 1072231533
+ .long 479979913
+ .long 3193842442
+ .long 2684354560
+ .long 1072228025
+ .long 1016321898
+ .long 1046251032
+ .long 3758096384
+ .long 1072224521
+ .long 562232474
+ .long 3191974558
+ .long 536870912
+ .long 1072221022
+ .long 3870512029
+ .long 3193113881
+ .long 1610612736
+ .long 1072217526
+ .long 1239780547
+ .long 3191583604
+ .long 2684354560
+ .long 1072214034
+ .long 2815421327
+ .long 1045873682
+ .long 0
+ .long 1072210547
+ .long 2371009561
+ .long 1041508792
+ .long 1610612736
+ .long 1072207063
+ .long 1304636524
+ .long 3192414284
+ .long 3221225472
+ .long 1072203583
+ .long 210144854
+ .long 3193327333
+ .long 0
+ .long 1072200108
+ .long 1454303272
+ .long 1046360024
+ .long 1610612736
+ .long 1072196636
+ .long 2095757548
+ .long 1044984677
+ .long 3221225472
+ .long 1072193168
+ .long 2027215580
+ .long 3192880933
+ .long 0
+ .long 1072189705
+ .long 214794880
+ .long 1043457954
+ .long 1073741824
+ .long 1072186245
+ .long 884624917
+ .long 1043497079
+ .long 2147483648
+ .long 1072182789
+ .long 2792396634
+ .long 3193171685
+ .long 2684354560
+ .long 1072179337
+ .long 4128995250
+ .long 3192103434
+ .long 2684354560
+ .long 1072175889
+ .long 333866043
+ .long 1046372325
+ .long 3221225472
+ .long 1072172445
+ .long 2194445544
+ .long 3193958905
+ .long 2684354560
+ .long 1072169005
+ .long 2316082269
+ .long 3192041703
+ .long 1610612736
+ .long 1072165569
+ .long 581005057
+ .long 1046322848
+ .long 536870912
+ .long 1072162137
+ .long 3280786513
+ .long 1045457251
+ .long 3221225472
+ .long 1072158708
+ .long 2567093361
+ .long 1044710359
+ .long 1073741824
+ .long 1072155284
+ .long 3740443584
+ .long 1044224237
+ .long 2684354560
+ .long 1072151863
+ .long 3981028272
+ .long 1042596351
+ .long 3758096384
+ .long 1072148446
+ .long 3820011120
+ .long 3191915623
+ .long 0
+ .long 1072145034
+ .long 2946439484
+ .long 3193831276
+ .long 3758096384
+ .long 1072141624
+ .long 3075274422
+ .long 3190132432
+ .long 2684354560
+ .long 1072138219
+ .long 496052167
+ .long 1043619760
+ .long 1073741824
+ .long 1072134818
+ .long 271106589
+ .long 3192265149
+ .long 2684354560
+ .long 1072131420
+ .long 2091955684
+ .long 1044443554
+ .long 3758096384
+ .long 1072128026
+ .long 723240109
+ .long 3191007419
+ .long 3758096384
+ .long 1072124636
+ .long 1748629070
+ .long 1044510075
+ .long 3221225472
+ .long 1072121250
+ .long 3289522046
+ .long 3193095178
+ .long 1610612736
+ .long 1072117868
+ .long 3599052146
+ .long 3193720427
+ .long 3221225472
+ .long 1072114489
+ .long 2446758135
+ .long 3193436303
+ .long 3758096384
+ .long 1072111114
+ .long 1652171097
+ .long 3192137173
+ .long 3221225472
+ .long 1072107743
+ .long 1353007155
+ .long 1044523902
+ .long 1610612736
+ .long 1072104376
+ .long 990601105
+ .long 1046296663
+ .long 3758096384
+ .long 1072101012
+ .long 2228627618
+ .long 3193041040
+ .long 0
+ .long 1072097653
+ .long 812484756
+ .long 3191950723
+ .long 3758096384
+ .long 1072094296
+ .long 817833130
+ .long 3192279242
+ .long 2147483648
+ .long 1072090944
+ .long 3563228521
+ .long 3193810951
+ .long 3221225472
+ .long 1072087595
+ .long 2729108859
+ .long 3190936185
+ .long 3221225472
+ .long 1072084250
+ .long 2249121662
+ .long 3190639690
+ .long 2147483648
+ .long 1072080909
+ .long 4082471745
+ .long 3193929368
+ .long 3758096384
+ .long 1072077571
+ .long 2827323806
+ .long 3193708561
+ .long 3758096384
+ .long 1072074237
+ .long 735866167
+ .long 1042434690
+ .long 2684354560
+ .long 1072070907
+ .long 3240808889
+ .long 3191918422
+ .long 0
+ .long 1072067581
+ .long 466482777
+ .long 3186962221
+ .long 0
+ .long 1072064258
+ .long 1576076296
+ .long 1045849056
+ .long 3221225472
+ .long 1072060938
+ .long 2751923560
+ .long 3191910703
+ .long 0
+ .long 1072057623
+ .long 1908755527
+ .long 1046437515
+ .long 0
+ .long 1072054311
+ .long 3175841411
+ .long 1044572886
+ .long 2684354560
+ .long 1072051002
+ .long 1633258450
+ .long 3192670420
+ .long 3221225472
+ .long 1072047697
+ .long 1867746657
+ .long 1045726209
+ .long 2684354560
+ .long 1072044396
+ .long 338968864
+ .long 3193084662
+ .long 0
+ .long 1072041099
+ .long 1501742471
+ .long 3191742031
+ .long 0
+ .long 1072037805
+ .long 4266775786
+ .long 3192686970
+ .long 2147483648
+ .long 1072034514
+ .long 4249283553
+ .long 1045769728
+ .long 2684354560
+ .long 1072031227
+ .long 2758366873
+ .long 1046402161
+ .long 1610612736
+ .long 1072027944
+ .long 2161186990
+ .long 1044736865
+ .long 2684354560
+ .long 1072024664
+ .long 810300171
+ .long 1045748777
+ .long 2147483648
+ .long 1072021388
+ .long 183688927
+ .long 3191515581
+ .long 3758096384
+ .long 1072018115
+ .long 368874072
+ .long 3192363575
+ .long 3221225472
+ .long 1072014846
+ .long 2459092970
+ .long 1041794640
+ .long 536870912
+ .long 1072011581
+ .long 867488640
+ .long 1046310291
+ .long 536870912
+ .long 1072008319
+ .long 50140871
+ .long 1043327329
+ .long 2684354560
+ .long 1072005060
+ .long 1241902518
+ .long 3192739252
+ .long 2684354560
+ .long 1072001805
+ .long 1027881659
+ .long 3193858388
+ .long 0
+ .long 1071998554
+ .long 38457322
+ .long 1045489179
+ .long 0
+ .long 1071995306
+ .long 3432963337
+ .long 3190969347
+ .long 1610612736
+ .long 1071992061
+ .long 534931792
+ .long 1046302734
+ .long 1610612736
+ .long 1071988820
+ .long 1817895268
+ .long 3192551860
+ .long 3221225472
+ .long 1071985582
+ .long 357237383
+ .long 3191870833
+ .long 2684354560
+ .long 1071982348
+ .long 108262401
+ .long 3193365867
+ .long 3758096384
+ .long 1071979117
+ .long 1964729244
+ .long 1042502249
+ .long 2684354560
+ .long 1071975890
+ .long 2088446957
+ .long 1038010503
+ .long 3221225472
+ .long 1071972666
+ .long 2947239447
+ .long 1046377845
+ .long 1610612736
+ .long 1071969446
+ .long 774932072
+ .long 1046064854
+ .long 2147483648
+ .long 1071966229
+ .long 4080937590
+ .long 3193041284
+ .long 3758096384
+ .long 1071963015
+ .long 2208251454
+ .long 1045945089
+ .long 3221225472
+ .long 1071959805
+ .long 2850924475
+ .long 1045650959
+ .long 0
+ .long 1071956599
+ .long 714040997
+ .long 1046275153
+ .long 3221225472
+ .long 1071953395
+ .long 85533782
+ .long 3192816920
+ .long 3221225472
+ .long 1071950195
+ .long 1252511005
+ .long 1044805706
+ .long 1073741824
+ .long 1071946999
+ .long 2384659038
+ .long 3193391602
+ .long 0
+ .long 1071943806
+ .long 416481813
+ .long 1043730233
+ .long 536870912
+ .long 1071940616
+ .long 1675424499
+ .long 1046348030
+ .long 3221225472
+ .long 1071937429
+ .long 1175989513
+ .long 3193009113
+ .long 2684354560
+ .long 1071934246
+ .long 2400084650
+ .long 3192451713
+ .long 3758096384
+ .long 1071931066
+ .long 1467335692
+ .long 3193350868
+ .long 1610612736
+ .long 1071927890
+ .long 266493801
+ .long 1044954481
+ .long 1073741824
+ .long 1071924717
+ .long 3919093445
+ .long 1046023575
+ .long 2147483648
+ .long 1071921547
+ .long 3017408483
+ .long 1044880828
+ .long 536870912
+ .long 1071918381
+ .long 948849966
+ .long 3193892224
+ .long 3758096384
+ .long 1071915217
+ .long 1870232600
+ .long 1045777228
+ .long 536870912
+ .long 1071912058
+ .long 822381492
+ .long 3193639186
+ .long 2147483648
+ .long 1071908901
+ .long 788243705
+ .long 1044966343
+ .long 1073741824
+ .long 1071905748
+ .long 1344278809
+ .long 1044428545
+ .long 1073741824
+ .long 1071902598
+ .long 172864300
+ .long 1045765608
+ .long 2684354560
+ .long 1071899451
+ .long 211555467
+ .long 3192963574
+ .long 536870912
+ .long 1071896308
+ .long 3373438023
+ .long 1045643168
+ .long 0
+ .long 1071893168
+ .long 2867180960
+ .long 3189945998
+ .long 536870912
+ .long 1071890031
+ .long 36724362
+ .long 3193240584
+ .long 1610612736
+ .long 1071886897
+ .long 2140176984
+ .long 1045945349
+ .long 0
+ .long 1071883767
+ .long 436842360
+ .long 1040712587
+ .long 3758096384
+ .long 1071880639
+ .long 1225147329
+ .long 3193814594
+ .long 3758096384
+ .long 1071877515
+ .long 1586157348
+ .long 3191614322
+ .long 536870912
+ .long 1071874395
+ .long 3329332918
+ .long 1041699791
+ .long 2684354560
+ .long 1071871277
+ .long 1635968041
+ .long 3191783756
+ .long 1073741824
+ .long 1071868163
+ .long 2876158382
+ .long 1046097093
+ .long 1073741824
+ .long 1071865052
+ .long 4267556964
+ .long 3193723000
+ .long 1073741824
+ .long 1071861944
+ .long 195475940
+ .long 1045520795
+ .long 2147483648
+ .long 1071858839
+ .long 2239193514
+ .long 1046478675
+ .long 0
+ .long 1071855738
+ .long 4168275596
+ .long 1044926285
+ .long 2684354560
+ .long 1071852639
+ .long 142514114
+ .long 1045595182
+ .long 2147483648
+ .long 1071849544
+ .long 1943457984
+ .long 3192930015
+ .long 2147483648
+ .long 1071846452
+ .long 202659489
+ .long 3193926317
+ .long 2684354560
+ .long 1071843363
+ .long 2208408789
+ .long 3193857484
+ .long 3758096384
+ .long 1071840277
+ .long 2237297552
+ .long 3192939576
+ .long 1073741824
+ .long 1071837195
+ .long 2726920839
+ .long 1044193954
+ .long 3758096384
+ .long 1071834115
+ .long 2337732207
+ .long 3193611773
+ .long 2147483648
+ .long 1071831039
+ .long 1390088602
+ .long 1044000317
+ .long 1610612736
+ .long 1071827966
+ .long 3806188736
+ .long 3193463913
+ .long 1073741824
+ .long 1071824896
+ .long 1795276560
+ .long 1043671965
+ .long 1073741824
+ .long 1071821829
+ .long 2960792799
+ .long 1046240474
+ .long 2147483648
+ .long 1071818765
+ .long 3350591592
+ .long 3193333939
+ .long 3221225472
+ .long 1071815704
+ .long 408870754
+ .long 3193322854
+ .long 0
+ .long 1071812647
+ .long 4146717132
+ .long 1046063520
+ .long 2147483648
+ .long 1071809592
+ .long 1681114919
+ .long 3192114313
+ .long 0
+ .long 1071806541
+ .long 1098393137
+ .long 3190846732
+ .long 2684354560
+ .long 1071803492
+ .long 2437484983
+ .long 3193448718
+ .long 1073741824
+ .long 1071800447
+ .long 1036809185
+ .long 3192023501
+ .long 0
+ .long 1071797405
+ .long 659668848
+ .long 3193596312
+ .long 3221225472
+ .long 1071794365
+ .long 1112062459
+ .long 3192773376
+ .long 2147483648
+ .long 1071791329
+ .long 4082956335
+ .long 1045830513
+ .long 1610612736
+ .long 1071788296
+ .long 2387089965
+ .long 1045532601
+ .long 1610612736
+ .long 1071785266
+ .long 1522101980
+ .long 3193941957
+ .long 1073741824
+ .long 1071782239
+ .long 2157197585
+ .long 3188193305
+ .long 1073741824
+ .long 1071779215
+ .long 946810220
+ .long 3193223819
+ .long 1073741824
+ .long 1071776194
+ .long 4069942444
+ .long 3193878549
+ .long 536870912
+ .long 1071773176
+ .long 1693463440
+ .long 1046360588
+ .long 536870912
+ .long 1071770161
+ .long 1954543254
+ .long 1046409381
+ .long 1073741824
+ .long 1071767149
+ .long 1050471249
+ .long 3193933095
+ .long 536870912
+ .long 1071764140
+ .long 1256240478
+ .long 1046456865
+ .long 536870912
+ .long 1071761134
+ .long 676764254
+ .long 1046055503
+ .long 536870912
+ .long 1071758131
+ .long 1421032967
+ .long 1044779786
+ .long 536870912
+ .long 1071755131
+ .long 38735992
+ .long 3192766355
+ .long 0
+ .long 1071752134
+ .long 2960669690
+ .long 1044484680
+ .long 3758096384
+ .long 1071749139
+ .long 788707382
+ .long 1045299895
+ .long 3221225472
+ .long 1071746148
+ .long 685689300
+ .long 1040778831
+ .long 2147483648
+ .long 1071743160
+ .long 1170994182
+ .long 1046159174
+ .long 1073741824
+ .long 1071740175
+ .long 64591436
+ .long 1046153849
+ .long 0
+ .long 1071737193
+ .long 2338031659
+ .long 3189997702
+ .long 2684354560
+ .long 1071734213
+ .long 1941624568
+ .long 3186752676
+ .long 536870912
+ .long 1071731237
+ .long 1401255580
+ .long 1046383990
+ .long 2684354560
+ .long 1071728263
+ .long 376888427
+ .long 1045896456
+ .long 536870912
+ .long 1071725293
+ .long 2831424639
+ .long 3193539109
+ .long 1610612736
+ .long 1071722325
+ .long 3303123696
+ .long 1044599415
+ .long 2684354560
+ .long 1071719360
+ .long 1077295329
+ .long 3189877372
+ .long 3221225472
+ .long 1071716398
+ .long 1434061099
+ .long 3184529771
+ .long 3221225472
+ .long 1071713439
+ .long 2104991590
+ .long 1045062074
+ .long 3221225472
+ .long 1071710483
+ .long 722060869
+ .long 3193788526
+ .long 536870912
+ .long 1071704580
+ .long 3928796486
+ .long 1046129020
+ .long 536870912
+ .long 1071698688
+ .long 588844628
+ .long 1045492135
+ .long 2684354560
+ .long 1071692807
+ .long 326739366
+ .long 3193004445
+ .long 1610612736
+ .long 1071686938
+ .long 2456436042
+ .long 1046278169
+ .long 2684354560
+ .long 1071681080
+ .long 2831303512
+ .long 1043670046
+ .long 536870912
+ .long 1071675234
+ .long 607223418
+ .long 1045507322
+ .long 0
+ .long 1071669399
+ .long 4254921332
+ .long 3193290483
+ .long 0
+ .long 1071663575
+ .long 914994333
+ .long 3191263853
+ .long 1073741824
+ .long 1071657762
+ .long 4147050180
+ .long 3193228552
+ .long 2684354560
+ .long 1071651960
+ .long 594554157
+ .long 3193503935
+ .long 0
+ .long 1071646170
+ .long 1062846796
+ .long 1045944331
+ .long 1073741824
+ .long 1071636109
+ .long 2909238893
+ .long 3193436884
+ .long 1073741824
+ .long 1071624572
+ .long 1682918119
+ .long 1042211899
+ .long 1073741824
+ .long 1071613057
+ .long 2419209426
+ .long 1045437062
+ .long 1073741824
+ .long 1071601564
+ .long 2951341321
+ .long 3190193214
+ .long 0
+ .long 1071590093
+ .long 3084900875
+ .long 3192394907
+ .long 1073741824
+ .long 1071578643
+ .long 999567454
+ .long 1046433447
+ .long 2147483648
+ .long 1071567215
+ .long 1570101857
+ .long 3193291160
+ .long 0
+ .long 1071555809
+ .long 1080647881
+ .long 3185154585
+ .long 0
+ .long 1071544424
+ .long 3526309177
+ .long 1044843640
+ .long 2147483648
+ .long 1071533060
+ .long 2213463349
+ .long 3191738930
+ .long 1073741824
+ .long 1071521718
+ .long 1039925195
+ .long 3192618353
+ .long 1073741824
+ .long 1071510397
+ .long 2115757280
+ .long 3193671567
+ .long 1073741824
+ .long 1071499097
+ .long 1188751495
+ .long 3191145560
+ .long 2147483648
+ .long 1071487818
+ .long 3983461449
+ .long 3193897029
+ .long 2147483648
+ .long 1071476560
+ .long 782141500
+ .long 1042879962
+ .long 2147483648
+ .long 1071465323
+ .long 4038904626
+ .long 1045063881
+ .long 2147483648
+ .long 1071454107
+ .long 2613036921
+ .long 3193217642
+ .long 0
+ .long 1071442912
+ .long 2095723435
+ .long 1044629175
+ .long 1073741824
+ .long 1071431737
+ .long 3879795974
+ .long 1045767874
+ .long 1073741824
+ .long 1071420583
+ .long 2662198042
+ .long 3191434637
+ .long 3221225472
+ .long 1071409449
+ .long 4037605722
+ .long 3193703090
+ .long 2147483648
+ .long 1071398336
+ .long 1860331835
+ .long 1040814822
+ .long 3221225472
+ .long 1071387243
+ .long 1522972033
+ .long 3190305974
+ .long 1073741824
+ .long 1071376171
+ .long 2361534207
+ .long 1043699366
+ .long 0
+ .long 1071365119
+ .long 4180309179
+ .long 1044142099
+ .long 0
+ .long 1071354087
+ .long 1201038528
+ .long 3192968772
+ .long 0
+ .long 1071343075
+ .long 1342478171
+ .long 3193251215
+ .long 0
+ .long 1071332083
+ .long 3836883348
+ .long 3193472007
+ .long 3221225472
+ .long 1071321110
+ .long 3864874250
+ .long 1045593126
+ .long 2147483648
+ .long 1071310158
+ .long 2169494998
+ .long 1046045346
+ .long 1073741824
+ .long 1071299226
+ .long 3785165075
+ .long 3193319246
+ .long 2147483648
+ .long 1071288313
+ .long 1137692678
+ .long 3192716779
+ .long 1073741824
+ .long 1071277420
+ .long 1752107598
+ .long 1046366120
+ .long 3221225472
+ .long 1071266546
+ .long 1912656912
+ .long 1046352281
+ .long 3221225472
+ .long 1071255692
+ .long 2882676334
+ .long 1046406353
+ .long 1073741824
+ .long 1071244858
+ .long 963612460
+ .long 1045282811
+ .long 0
+ .long 1071234043
+ .long 3811255773
+ .long 1046231636
+ .long 1073741824
+ .long 1071223247
+ .long 1126055989
+ .long 3192224037
+ .long 2147483648
+ .long 1071212470
+ .long 2079145427
+ .long 1044432413
+ .long 0
+ .long 1071201713
+ .long 3611595621
+ .long 1043358745
+ .long 2147483648
+ .long 1071190974
+ .long 390522769
+ .long 1045888252
+ .long 1073741824
+ .long 1071180255
+ .long 4087939723
+ .long 3192930745
+ .long 3221225472
+ .long 1071169554
+ .long 1451494480
+ .long 3190219274
+ .long 1073741824
+ .long 1071158873
+ .long 427176194
+ .long 3193042022
+ .long 2147483648
+ .long 1071148210
+ .long 1882381948
+ .long 3192727946
+ .long 2147483648
+ .long 1071137566
+ .long 3736313771
+ .long 3192087019
+ .long 1073741824
+ .long 1071126941
+ .long 1560398816
+ .long 3193185715
+ .long 2147483648
+ .long 1071116334
+ .long 1021942441
+ .long 1041526696
+ .long 2147483648
+ .long 1071105746
+ .long 3517080249
+ .long 3193576041
+ .long 3221225472
+ .long 1071095176
+ .long 2248589878
+ .long 1044527624
+ .long 2147483648
+ .long 1071084625
+ .long 2412896695
+ .long 1046112867
+ .long 3221225472
+ .long 1071074092
+ .long 3834725738
+ .long 1044562378
+ .long 1073741824
+ .long 1071063578
+ .long 1150920407
+ .long 1043768986
+ .long 0
+ .long 1071053082
+ .long 1379393428
+ .long 3188690690
+ .long 0
+ .long 1071042604
+ .long 3058183278
+ .long 3193617655
+ .long 0
+ .long 1071032144
+ .long 421133665
+ .long 3193417186
+ .long 0
+ .long 1071021702
+ .long 2860161357
+ .long 3191816125
+ .long 0
+ .long 1071011278
+ .long 1742405964
+ .long 1043580240
+ .long 0
+ .long 1071000872
+ .long 2821215927
+ .long 3188984273
+ .long 3221225472
+ .long 1070990483
+ .long 510275597
+ .long 1045813401
+ .long 2147483648
+ .long 1070980113
+ .long 304266588
+ .long 3191193536
+ .long 3221225472
+ .long 1070969760
+ .long 1854784211
+ .long 1046302073
+ .long 0
+ .long 1070959426
+ .long 3773082854
+ .long 3193008899
+ .long 2147483648
+ .long 1070949108
+ .long 3003572392
+ .long 1046404879
+ .long 3221225472
+ .long 1070938808
+ .long 1702149204
+ .long 1046407257
+ .long 2147483648
+ .long 1070928526
+ .long 3935314439
+ .long 1046438280
+ .long 3221225472
+ .long 1070918261
+ .long 2677087609
+ .long 1045501749
+ .long 2147483648
+ .long 1070908014
+ .long 4190598039
+ .long 3193640515
+ .long 1073741824
+ .long 1070897784
+ .long 368874072
+ .long 1044879927
+ .long 2147483648
+ .long 1070887571
+ .long 3584052697
+ .long 3192024662
+ .long 3221225472
+ .long 1070877375
+ .long 3762307829
+ .long 1045886918
+ .long 1073741824
+ .long 1070867197
+ .long 495710920
+ .long 1046317072
+ .long 0
+ .long 1070857036
+ .long 2292768238
+ .long 3190887508
+ .long 3221225472
+ .long 1070846891
+ .long 1044078151
+ .long 3193772914
+ .long 1073741824
+ .long 1070836764
+ .long 3266010457
+ .long 1043443755
+ .long 3221225472
+ .long 1070826653
+ .long 3571665822
+ .long 1045547823
+ .long 1073741824
+ .long 1070816560
+ .long 393348347
+ .long 3190525143
+ .long 2147483648
+ .long 1070806483
+ .long 4241722498
+ .long 3192084193
+ .long 2147483648
+ .long 1070796423
+ .long 1693797068
+ .long 3192807972
+ .long 0
+ .long 1070786380
+ .long 2860086745
+ .long 1046331646
+ .long 2147483648
+ .long 1070776353
+ .long 1366141759
+ .long 3192979363
+ .long 1073741824
+ .long 1070766343
+ .long 737899283
+ .long 1045853346
+ .long 3221225472
+ .long 1070756349
+ .long 88734873
+ .long 1043881257
+ .long 3221225472
+ .long 1070746372
+ .long 1438003315
+ .long 3192917101
+ .long 0
+ .long 1070736412
+ .long 1066505530
+ .long 1043896695
+ .long 3221225472
+ .long 1070726467
+ .long 2706653041
+ .long 3191113643
+ .long 3221225472
+ .long 1070716539
+ .long 1321764476
+ .long 1039573724
+ .long 0
+ .long 1070706628
+ .long 1126753211
+ .long 1044502976
+ .long 2147483648
+ .long 1070696732
+ .long 773642884
+ .long 1044110727
+ .long 1073741824
+ .long 1070686853
+ .long 1263743406
+ .long 3193115278
+ .long 0
+ .long 1070676990
+ .long 3115237732
+ .long 3193089176
+ .long 3221225472
+ .long 1070667142
+ .long 3642626838
+ .long 3191146032
+ .long 2147483648
+ .long 1070657311
+ .long 2091696428
+ .long 1044337177
+ .long 1073741824
+ .long 1070647496
+ .long 3168958391
+ .long 1044197568
+ .long 0
+ .long 1070637697
+ .long 711148669
+ .long 3193181047
+ .long 2147483648
+ .long 1070627913
+ .long 4207182773
+ .long 3193402092
+ .long 3221225472
+ .long 1070618145
+ .long 918070640
+ .long 3192902845
+ .long 3221225472
+ .long 1070608393
+ .long 3135571447
+ .long 3192193928
+ .long 2147483648
+ .long 1070598657
+ .long 1043705517
+ .long 3193188604
+ .long 2147483648
+ .long 1070581777
+ .long 1886680492
+ .long 1043890286
+ .long 2147483648
+ .long 1070562367
+ .long 3373799420
+ .long 3191917802
+ .long 2147483648
+ .long 1070542988
+ .long 2919618025
+ .long 3192461752
+ .long 2147483648
+ .long 1070523640
+ .long 2926365158
+ .long 3193113492
+ .long 0
+ .long 1070504323
+ .long 519978638
+ .long 1045918846
+ .long 0
+ .long 1070485037
+ .long 3665353151
+ .long 3193546248
+ .long 0
+ .long 1070465781
+ .long 2327718958
+ .long 1045050797
+ .long 0
+ .long 1070446556
+ .long 345326861
+ .long 3188224716
+ .long 2147483648
+ .long 1070427361
+ .long 2263747488
+ .long 3192871328
+ .long 0
+ .long 1070408197
+ .long 3894192264
+ .long 1045693123
+ .long 0
+ .long 1070389063
+ .long 994321593
+ .long 1046347203
+ .long 2147483648
+ .long 1070369959
+ .long 3540366700
+ .long 1042296230
+ .long 0
+ .long 1070350886
+ .long 966420752
+ .long 3192400412
+ .long 2147483648
+ .long 1070331842
+ .long 1954511160
+ .long 3193467762
+ .long 2147483648
+ .long 1070312828
+ .long 1875003040
+ .long 1045485629
+ .long 0
+ .long 1070293845
+ .long 4003372005
+ .long 3193714109
+ .long 2147483648
+ .long 1070274890
+ .long 2216083644
+ .long 1045720399
+ .long 0
+ .long 1070255966
+ .long 1240985743
+ .long 1045879414
+ .long 0
+ .long 1070237071
+ .long 1573064162
+ .long 1046427916
+ .long 0
+ .long 1070218206
+ .long 2500166582
+ .long 3193848169
+ .long 2147483648
+ .long 1070199369
+ .long 862131539
+ .long 1045606065
+ .long 0
+ .long 1070180563
+ .long 3733427622
+ .long 3193545988
+ .long 0
+ .long 1070161785
+ .long 124515358
+ .long 1045504766
+ .long 2147483648
+ .long 1070143036
+ .long 689228007
+ .long 1044238436
+ .long 0
+ .long 1070124317
+ .long 976284835
+ .long 3189879978
+ .long 2147483648
+ .long 1070105626
+ .long 2997446224
+ .long 3193394244
+ .long 2147483648
+ .long 1070086964
+ .long 594985163
+ .long 3190453447
+ .long 2147483648
+ .long 1070068331
+ .long 3634411091
+ .long 3193012662
+ .long 0
+ .long 1070049727
+ .long 841316482
+ .long 3192551604
+ .long 0
+ .long 1070031151
+ .long 518949849
+ .long 3189505693
+ .long 2147483648
+ .long 1070012603
+ .long 207633604
+ .long 1043791305
+ .long 2147483648
+ .long 1069994084
+ .long 925415631
+ .long 3189658670
+ .long 2147483648
+ .long 1069975593
+ .long 3348775015
+ .long 1046231055
+ .long 0
+ .long 1069957131
+ .long 4137593961
+ .long 1045760644
+ .long 2147483648
+ .long 1069938696
+ .long 3081207972
+ .long 1046319652
+ .long 2147483648
+ .long 1069920290
+ .long 2912811806
+ .long 3193250863
+ .long 0
+ .long 1069901912
+ .long 1704663230
+ .long 3192651171
+ .long 2147483648
+ .long 1069883561
+ .long 1726887473
+ .long 3193427817
+ .long 2147483648
+ .long 1069865238
+ .long 516302873
+ .long 1042556919
+ .long 2147483648
+ .long 1069846943
+ .long 3737277289
+ .long 3192083505
+ .long 0
+ .long 1069828676
+ .long 2829909067
+ .long 3191628520
+ .long 0
+ .long 1069810436
+ .long 3474800299
+ .long 3187384991
+ .long 2147483648
+ .long 1069792223
+ .long 2041291754
+ .long 3186735048
+ .long 2147483648
+ .long 1069774038
+ .long 3100739290
+ .long 3192991951
+ .long 2147483648
+ .long 1069755880
+ .long 2641686866
+ .long 1042449846
+ .long 0
+ .long 1069737750
+ .long 1353612457
+ .long 3192928544
+ .long 2147483648
+ .long 1069719646
+ .long 1823398190
+ .long 3193125156
+ .long 0
+ .long 1069701570
+ .long 2629108558
+ .long 3192983089
+ .long 2147483648
+ .long 1069683520
+ .long 314889080
+ .long 3193178947
+ .long 2147483648
+ .long 1069665497
+ .long 3426846470
+ .long 1046055034
+ .long 0
+ .long 1069647502
+ .long 2451521798
+ .long 3193081447
+ .long 2147483648
+ .long 1069629532
+ .long 963200030
+ .long 1046315089
+ .long 0
+ .long 1069611590
+ .long 3644976987
+ .long 1046450297
+ .long 2147483648
+ .long 1069593674
+ .long 1514045874
+ .long 3193337489
+ .long 0
+ .long 1069575785
+ .long 2640752615
+ .long 3192734715
+ .long 0
+ .long 1069557922
+ .long 177381730
+ .long 3193107348
+ .long 0
+ .long 1069532650
+ .long 546871269
+ .long 1045601847
+ .long 0
+ .long 1069497029
+ .long 2220408187
+ .long 1045964849
+ .long 0
+ .long 1069461461
+ .long 3101209784
+ .long 3192417098
+ .long 0
+ .long 1069425944
+ .long 3768825782
+ .long 1046196178
+ .long 0
+ .long 1069390480
+ .long 737308942
+ .long 1043872555
+ .long 0
+ .long 1069355068
+ .long 1944808119
+ .long 3193362317
+ .long 0
+ .long 1069319707
+ .long 852406261
+ .long 3191004250
+ .long 0
+ .long 1069284398
+ .long 3202370743
+ .long 3192549796
+ .long 0
+ .long 1069249140
+ .long 900633975
+ .long 1043862575
+ .long 0
+ .long 1069213934
+ .long 3417168564
+ .long 3193213168
+ .long 0
+ .long 1069178778
+ .long 2513309972
+ .long 1046051953
+ .long 0
+ .long 1069143674
+ .long 1836846968
+ .long 1044036653
+ .long 0
+ .long 1069108621
+ .long 675391362
+ .long 3193334972
+ .long 0
+ .long 1069073618
+ .long 1859398086
+ .long 3191668729
+ .long 0
+ .long 1069038666
+ .long 3835994043
+ .long 3193252196
+ .long 0
+ .long 1069003764
+ .long 563337246
+ .long 3192060530
+ .long 0
+ .long 1068968912
+ .long 3715154210
+ .long 1045592716
+ .long 0
+ .long 1068934111
+ .long 51415636
+ .long 3192193939
+ .long 0
+ .long 1068899359
+ .long 822049108
+ .long 1045846080
+ .long 0
+ .long 1068864658
+ .long 3739043340
+ .long 3193184949
+ .long 0
+ .long 1068830006
+ .long 2500828997
+ .long 3193115638
+ .long 0
+ .long 1068795403
+ .long 1479335089
+ .long 1045458233
+ .long 0
+ .long 1068760850
+ .long 1914098598
+ .long 1045079833
+ .long 0
+ .long 1068726346
+ .long 1470374909
+ .long 1046125471
+ .long 0
+ .long 1068691892
+ .long 2048101185
+ .long 3192960024
+ .long 0
+ .long 1068657486
+ .long 801101802
+ .long 1042523454
+ .long 0
+ .long 1068623129
+ .long 412171467
+ .long 1044799425
+ .long 0
+ .long 1068588821
+ .long 2124566049
+ .long 1040459843
+ .long 0
+ .long 1068554561
+ .long 2087558263
+ .long 1046083102
+ .long 0
+ .long 1068520350
+ .long 290389316
+ .long 1045220023
+ .long 0
+ .long 1068473430
+ .long 393737815
+ .long 1045770085
+ .long 0
+ .long 1068405202
+ .long 3273111658
+ .long 3193594336
+ .long 0
+ .long 1068337068
+ .long 3076935419
+ .long 3191993934
+ .long 0
+ .long 1068269030
+ .long 1564279721
+ .long 1040713632
+ .long 0
+ .long 1068201088
+ .long 1950103787
+ .long 3191285473
+ .long 0
+ .long 1068133240
+ .long 111301617
+ .long 1046140470
+ .long 0
+ .long 1068065488
+ .long 2740933659
+ .long 1046091898
+ .long 0
+ .long 1067997832
+ .long 1267131462
+ .long 3192947024
+ .long 0
+ .long 1067930268
+ .long 629787343
+ .long 1045599114
+ .long 0
+ .long 1067862800
+ .long 2943029746
+ .long 3191100621
+ .long 0
+ .long 1067795426
+ .long 2538631151
+ .long 3193953989
+ .long 0
+ .long 1067728144
+ .long 3881795033
+ .long 3191377363
+ .long 0
+ .long 1067660956
+ .long 2752747058
+ .long 3186250103
+ .long 0
+ .long 1067593862
+ .long 892170014
+ .long 3193330390
+ .long 0
+ .long 1067526860
+ .long 2000985783
+ .long 3192968647
+ .long 0
+ .long 1067459950
+ .long 1954077304
+ .long 1044399908
+ .long 0
+ .long 1067335900
+ .long 4120702847
+ .long 3193150730
+ .long 0
+ .long 1067202448
+ .long 353489980
+ .long 1045676744
+ .long 0
+ .long 1067069184
+ .long 2609643324
+ .long 3192108001
+ .long 0
+ .long 1066936100
+ .long 2904433317
+ .long 1044836541
+ .long 0
+ .long 1066803200
+ .long 319656790
+ .long 1044863904
+ .long 0
+ .long 1066670484
+ .long 2407987331
+ .long 3192995083
+ .long 0
+ .long 1066537948
+ .long 2437746120
+ .long 3193127733
+ .long 0
+ .long 1066405592
+ .long 762570215
+ .long 3189946997
+ .long 0
+ .long 1066145040
+ .long 3317159694
+ .long 1046060125
+ .long 0
+ .long 1065881056
+ .long 2317845886
+ .long 3191679176
+ .long 0
+ .long 1065617424
+ .long 3665195816
+ .long 1045633853
+ .long 0
+ .long 1065354160
+ .long 2008730355
+ .long 3193898211
+ .long 0
+ .long 1064829264
+ .long 3746236192
+ .long 1046121471
+ .long 0
+ .long 1064303680
+ .long 885296753
+ .long 3191852441
+ .long 0
+ .long 1063253696
+ .long 449976495
+ .long 3192682663
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 4294965248
+ .long 0
+ .long 4294965248
+ .long 0
+ .long 1073160192
+ .long 370913857
+ .long 3210587105
+ .long 1841914130
+ .long 3213059448
+ .long 3995341938
+ .long 3214607105
+ .long 2677381210
+ .long 3216320731
+ .long 3011779882
+ .long 3218479542
+ .long 1367832035
+ .long 1066403058
+ .long 2894285243
+ .long 1067936923
+ .long 1215221452
+ .long 1069835102
+ .long 370913857
+ .long 3210587105
+ .long 2677381210
+ .long 3216320731
+ .long 4172642429
+ .long 1056068382
+ .long 1215221451
+ .long 1069835102
+ .long 1092638156
+ .long 3184925618
+ .long 0
+ .long 4294967288
+ .long 0
+ .long 4294967295
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 997195776
+ .long 4200250559
+ .long 1072696090
+ .long 2808127345
+ .long 3162830514
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 339411585
+ .long 1072701800
+ .long 264588982
+ .long 3162685233
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 772914124
+ .long 1072707540
+ .long 4004372762
+ .long 1013278737
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 1928746161
+ .long 1072713311
+ .long 983617676
+ .long 1015333753
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 238821257
+ .long 1072719114
+ .long 1469694871
+ .long 3163933563
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 728934454
+ .long 1072724948
+ .long 1413842688
+ .long 1015227188
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 4133881824
+ .long 1072730813
+ .long 2148155345
+ .long 3163979875
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 2602514713
+ .long 1072736711
+ .long 2268929336
+ .long 1015402860
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 1172597893
+ .long 1072742641
+ .long 114433263
+ .long 1016396169
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 590962156
+ .long 1072748603
+ .long 3829346666
+ .long 3164324173
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 1608493509
+ .long 1072754597
+ .long 3159622171
+ .long 3163856313
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 685187902
+ .long 1072760624
+ .long 378731989
+ .long 1015891691
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 2875075254
+ .long 1072766683
+ .long 4144233330
+ .long 3164382292
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 351405227
+ .long 1072772776
+ .long 3125337328
+ .long 3160871055
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 2471440686
+ .long 1072778901
+ .long 968836267
+ .long 3163263464
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1416741826
+ .long 1072785060
+ .long 2196380210
+ .long 1012462139
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 2257959872
+ .long 1072791252
+ .long 3802946148
+ .long 1014013503
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 1480023343
+ .long 1072797478
+ .long 2247196168
+ .long 1016376029
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 4162030108
+ .long 1072803737
+ .long 2763428480
+ .long 1016577925
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 2502433899
+ .long 1072810031
+ .long 2148595913
+ .long 1016072567
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 1588871207
+ .long 1072816359
+ .long 143439582
+ .long 3164011992
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2218315341
+ .long 1072822721
+ .long 2694295388
+ .long 3164337444
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 897099801
+ .long 1072829118
+ .long 754756297
+ .long 1016289581
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 2725843665
+ .long 1072835549
+ .long 1433917087
+ .long 1015887099
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 4219606026
+ .long 1072842015
+ .long 2434574742
+ .long 1015730124
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1897844341
+ .long 1072848517
+ .long 1254300460
+ .long 1016324514
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 874372905
+ .long 1072855054
+ .long 100263788
+ .long 1016989308
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 1972484976
+ .long 1072861626
+ .long 675290301
+ .long 3162688626
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 1724976915
+ .long 1072868234
+ .long 420909223
+ .long 3164165955
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 964107055
+ .long 1072874878
+ .long 2800439588
+ .long 3163881797
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 526652809
+ .long 1072881558
+ .long 4223459736
+ .long 1016927951
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 1253935211
+ .long 1072888274
+ .long 1395382931
+ .long 3160751189
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 3991843581
+ .long 1072895026
+ .long 4092853457
+ .long 1015634339
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 1000925746
+ .long 1072901816
+ .long 1018491672
+ .long 3164358120
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1726216749
+ .long 1072908642
+ .long 2466808228
+ .long 3162724981
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 2732492859
+ .long 1072915505
+ .long 2691479646
+ .long 3163304260
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 589198666
+ .long 1072922406
+ .long 2664346172
+ .long 3164206538
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 460407023
+ .long 1072929344
+ .long 4237175092
+ .long 3164187045
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3219942644
+ .long 1072936319
+ .long 3798990616
+ .long 1016417382
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1156440435
+ .long 1072943333
+ .long 2351451249
+ .long 1015015632
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 3743175029
+ .long 1072950384
+ .long 2072812490
+ .long 3163223651
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 3278348324
+ .long 1072957474
+ .long 3069497416
+ .long 1015799288
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 654919306
+ .long 1072964603
+ .long 3232961757
+ .long 3164096045
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1065662932
+ .long 1072971770
+ .long 2533670915
+ .long 1015578814
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 1118294578
+ .long 1072978976
+ .long 2197495694
+ .long 3160957977
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 1720398391
+ .long 1072986221
+ .long 3980678963
+ .long 3164348656
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 3784486610
+ .long 1072993505
+ .long 1581883040
+ .long 3162747529
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3933059031
+ .long 1073000829
+ .long 2133366768
+ .long 3162580408
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 3088564500
+ .long 1073008193
+ .long 1762311517
+ .long 1016094249
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 2178460671
+ .long 1073015597
+ .long 777878098
+ .long 3163891069
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2135241198
+ .long 1073023041
+ .long 1236747871
+ .long 1014637723
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 3896463087
+ .long 1073030525
+ .long 1139797873
+ .long 3162282381
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 4109806887
+ .long 1073038050
+ .long 422403966
+ .long 1015517805
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 3723038930
+ .long 1073045616
+ .long 378465264
+ .long 3163618158
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3689071823
+ .long 1073053223
+ .long 2321004996
+ .long 3163601292
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 671025100
+ .long 1073060872
+ .long 3832014351
+ .long 3164070606
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 4222122499
+ .long 1073068561
+ .long 1277378074
+ .long 3164305313
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 2425981843
+ .long 1073076293
+ .long 2830390851
+ .long 3164395175
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 551349105
+ .long 1073084067
+ .long 3821916050
+ .long 3163155165
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 3872257780
+ .long 1073091882
+ .long 1253592103
+ .long 1017006910
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 488188413
+ .long 1073099741
+ .long 3199821029
+ .long 1016612624
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 4273770423
+ .long 1073107641
+ .long 3383180809
+ .long 3164267477
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3339203574
+ .long 1073115585
+ .long 1483497780
+ .long 3163457330
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 2979960120
+ .long 1073123572
+ .long 2599109725
+ .long 1015547069
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 4201977662
+ .long 1073131602
+ .long 748330254
+ .long 1014642933
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 3721688645
+ .long 1073139676
+ .long 3069276937
+ .long 1016887977
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 2555984613
+ .long 1073147794
+ .long 2652555442
+ .long 3163601268
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 1727278727
+ .long 1073155956
+ .long 3562710623
+ .long 1012520516
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 2263535754
+ .long 1073164162
+ .long 752233586
+ .long 3163687584
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 903334909
+ .long 1073172413
+ .long 1636462108
+ .long 1016088573
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 2980802057
+ .long 1073180708
+ .long 378619896
+ .long 1016821879
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 950803702
+ .long 1073189049
+ .long 1655364926
+ .long 1016285608
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 158781403
+ .long 1073197435
+ .long 2221464712
+ .long 3164335029
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 1660913392
+ .long 1073205866
+ .long 4218599604
+ .long 1016184283
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 2224145553
+ .long 1073214343
+ .long 3482522030
+ .long 3162537745
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2916157145
+ .long 1073222866
+ .long 219487565
+ .long 1016357943
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 515457527
+ .long 1073231436
+ .long 836709333
+ .long 1016699802
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 396319521
+ .long 1073240052
+ .long 4172420816
+ .long 3160123208
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3643909174
+ .long 1073248714
+ .long 3537586109
+ .long 1015403223
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 2759350287
+ .long 1073257424
+ .long 1148526634
+ .long 1016943509
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 3134592888
+ .long 1073266181
+ .long 4232266862
+ .long 1017039710
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 1577608921
+ .long 1073274986
+ .long 1875489510
+ .long 3164016970
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 3492293770
+ .long 1073283838
+ .long 2248032210
+ .long 1016435402
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 1403662306
+ .long 1073292739
+ .long 2788809599
+ .long 3162719583
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 727685349
+ .long 1073301688
+ .long 2038246809
+ .long 3163407318
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2591453363
+ .long 1073310685
+ .long 2132396182
+ .long 3160122774
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 3833209506
+ .long 1073319731
+ .long 2722920684
+ .long 1014803418
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 1297350157
+ .long 1073328827
+ .long 1308022040
+ .long 3164461134
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 424392917
+ .long 1073337972
+ .long 2749202995
+ .long 3163887294
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2366108318
+ .long 1073347166
+ .long 2867985102
+ .long 3162810830
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3985553595
+ .long 1073356410
+ .long 4002146062
+ .long 1016882712
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2152073944
+ .long 1073365705
+ .long 1486860576
+ .long 3164252032
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 2331271250
+ .long 1073375050
+ .long 812057446
+ .long 1013256022
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1405169241
+ .long 1073384446
+ .long 2998539689
+ .long 3163879527
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 557149882
+ .long 1073393893
+ .long 3672720709
+ .long 1015585841
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 977020788
+ .long 1073403391
+ .long 3065100517
+ .long 1016590139
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 3861050111
+ .long 1073412940
+ .long 254893773
+ .long 3163861756
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 1822067026
+ .long 1073422542
+ .long 1241994956
+ .long 1016388866
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 364333489
+ .long 1073432196
+ .long 3923737744
+ .long 3162469949
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 703710506
+ .long 1073441902
+ .long 1384660846
+ .long 1016244467
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 4062661092
+ .long 1073451660
+ .long 1422616006
+ .long 3164303894
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 3080351519
+ .long 1073461472
+ .long 3379126789
+ .long 3158266577
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 3287523847
+ .long 1073471337
+ .long 1625971539
+ .long 3158058531
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 1631695677
+ .long 1073481256
+ .long 2717633076
+ .long 3163392602
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 3657065772
+ .long 1073491228
+ .long 399025623
+ .long 3164005654
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 2029714210
+ .long 1073501255
+ .long 613660079
+ .long 1016147719
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2307442995
+ .long 1073511336
+ .long 3190117721
+ .long 3163453115
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 1464976603
+ .long 1073521472
+ .long 3507292405
+ .long 3163026110
+ .long 3706687593
+ .long 1073526560
+ .long 3521726939
+ .long 1014301643
+ .long 778901109
+ .long 1073531663
+ .long 2248183954
+ .long 3162317327
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1532734324
+ .long 1073541909
+ .long 3094216535
+ .long 3164211433
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 721996136
+ .long 1073552211
+ .long 563754734
+ .long 1016419894
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3939148246
+ .long 1073562568
+ .long 3210352148
+ .long 1016322899
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 3898795731
+ .long 1073572982
+ .long 1249994144
+ .long 1012918394
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 1912561781
+ .long 1073583453
+ .long 3147495102
+ .long 1016726829
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 3594158869
+ .long 1073593980
+ .long 2456521700
+ .long 3164305137
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 1679558232
+ .long 1073604565
+ .long 2390342287
+ .long 3164382546
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 1796832535
+ .long 1073615207
+ .long 3176955716
+ .long 3161634089
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 991358482
+ .long 1073625907
+ .long 838715019
+ .long 3164206244
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 610758006
+ .long 1073636665
+ .long 1965209397
+ .long 3162914808
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2009970496
+ .long 1073647481
+ .long 2159039665
+ .long 3163621524
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 2256325230
+ .long 1073658356
+ .long 580117746
+ .long 1016365871
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 2719515920
+ .long 1073669290
+ .long 2760332941
+ .long 1016186509
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 481706282
+ .long 1073680284
+ .long 1696079173
+ .long 3163759104
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1222472308
+ .long 1073691337
+ .long 1054357470
+ .long 3162069594
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2038973688
+ .long 1073702450
+ .long 892941374
+ .long 1017095035
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 35929225
+ .long 1073713624
+ .long 2809788041
+ .long 3160485544
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 915592468
+ .long 1073724858
+ .long 352947894
+ .long 3162072947
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .long 1797923801
+ .long 1073736153
+ .long 1950547427
+ .long 1014277635
+ .long 3884607281
+ .long 1062590591
+ .long 3607404736
+ .long 1068264200
+ .long 1874480759
+ .long 1065595563
+ .long 4286760335
+ .long 1070514109
+ .long 4277811695
+ .long 1072049730
+ .long 0
+ .long 0
+ .long 4277811695
+ .long 1072049730
+ .long 4277811695
+ .long 3219533378
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .type static_const_table,@object
+ .size static_const_table,12576
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/e_sinh.S b/libm/x86/e_sinh.S
new file mode 100644
index 0000000..d6b04b5
--- /dev/null
+++ b/libm/x86/e_sinh.S
@@ -0,0 +1,1407 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// sinh(x)=(exp(x)-exp(-x))/2
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7),
+// f=0.b1 b2 ... b7, k integer
+// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f]
+// Tp stores the high 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision
+//
+// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14},
+// for |x| in [23/64,3*2^7)
+// e^{-|x|}=2^{-k-f}*2^{-r}
+//
+// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp=
+// =2^k*Tp+2^k*Tp*P15+2^k*Dp
+// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)+2^{-k}*Dn
+//
+// For |x| in [1/8, 3*2^7), sinh(x) is formed as
+// RN(2^k*Tp-2^{-k}*Tn)+2^k*Tp*P15-2^{-k}*Tn*P`15-2^{-k}*TnL-2^{-k}*Dn+2^k*Dp
+//
+// For x in (3*2^7, 3*2^8), sign(x)*(e^|x|)/2 is returned, and
+// the result is checked for overflow.
+//
+// For |x|<23/64, a Taylor polynomial expansion is used (degree 13)
+// To reduce rounding errors, the p3*x^3 term is computed as
+// (p3*xh^3)_high+[(p3*xl*(3*x*xh+xl^2))+(p3*xh^3)_low],
+// where x=xh+xl, (xh are the leading 17 bits of x), and
+// (p3*xh^3)_high=RN(x+p3*xh^3)-x
+// (error bound for polynomial expansion is below 0.51 ulp)
+//
+// Special cases:
+// sinh(NaN) = quiet NaN, and raise invalid exception
+// sinh(+/-INF) = +/-INF
+// sinh(x) = x for subnormals
+// for finite argument, only sinh(0)=0 is exact
+// For IEEE double
+// sinh(x) overflows for x >
+// 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin sinh
+ENTRY(sinh)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ movsd 4272(%ebx), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd 4192(%ebx), %xmm1
+ movsd 4200(%ebx), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd 4096(%ebx), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ movl $32768, %edx
+ andl %ecx, %edx
+ andl $32767, %ecx
+ subl $16343, %ecx
+ cmpl $177, %ecx
+ jae .L_2TAG_PACKET_0.0.2
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ shll $3, %edx
+ orl %edx, %eax
+ movapd %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ xorpd %xmm5, %xmm5
+ subsd %xmm6, %xmm3
+ movapd 4112(%ebx), %xmm4
+ addsd %xmm1, %xmm2
+ movapd 4128(%ebx), %xmm6
+ subsd %xmm3, %xmm7
+ movl $32704, %edx
+ pinsrw $3, %edx, %xmm5
+ movapd 4144(%ebx), %xmm1
+ addsd %xmm7, %xmm2
+ movl $127, %edx
+ andl %eax, %edx
+ addl %edx, %edx
+ shrl $3, %eax
+ andl $65520, %eax
+ addl $16352, %eax
+ xorpd %xmm0, %xmm0
+ cmpl $161, %ecx
+ jae .L_2TAG_PACKET_1.0.2
+ pshufd $68, %xmm5, %xmm5
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ psubw %xmm0, %xmm5
+ mulpd (%ebx,%edx,8), %xmm0
+ mulpd 2048(%ebx,%edx,8), %xmm5
+ pshufd $68, %xmm2, %xmm3
+ movapd 4160(%ebx), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ mulpd %xmm3, %xmm3
+ mulpd %xmm2, %xmm4
+ mulpd %xmm2, %xmm6
+ mulpd 4176(%ebx), %xmm2
+ mulpd %xmm3, %xmm1
+ mulpd %xmm3, %xmm7
+ mulpd %xmm3, %xmm4
+ mulpd %xmm3, %xmm1
+ addpd %xmm7, %xmm6
+ movapd %xmm0, %xmm7
+ addpd %xmm1, %xmm4
+ shufpd $0, %xmm5, %xmm7
+ subpd %xmm5, %xmm0
+ mulpd %xmm7, %xmm2
+ addpd %xmm6, %xmm4
+ subsd %xmm0, %xmm7
+ mulpd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ subsd %xmm5, %xmm7
+ addpd %xmm2, %xmm4
+ addsd %xmm6, %xmm7
+ pshufd $238, %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_1.0.2:
+ subl $16352, %eax
+ movl %eax, %ecx
+ andl $32752, %eax
+ shrl $1, %eax
+ andl $65520, %eax
+ subl %eax, %ecx
+ addl $16352, %eax
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ mulpd (%ebx,%edx,8), %xmm0
+ pshufd $68, %xmm2, %xmm3
+ movsd 4160(%ebx), %xmm7
+ mulsd %xmm3, %xmm3
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd 4176(%ebx), %xmm2
+ mulsd %xmm3, %xmm1
+ mulsd %xmm3, %xmm7
+ mulsd %xmm3, %xmm4
+ addl $16368, %ecx
+ pinsrw $3, %ecx, %xmm5
+ mulsd %xmm3, %xmm1
+ addsd %xmm7, %xmm6
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ addsd %xmm6, %xmm4
+ mulsd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm6, %xmm4
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm5, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ movl $127, %edx
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_3.0.2
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_0.0.2:
+ addl $16343, %ecx
+ cmpl $16343, %ecx
+ ja .L_2TAG_PACKET_4.0.2
+ cmpl $15856, %ecx
+ jb .L_2TAG_PACKET_5.0.2
+ movapd 4208(%ebx), %xmm1
+ pshufd $68, %xmm0, %xmm6
+ mulpd %xmm5, %xmm5
+ movapd 4224(%ebx), %xmm2
+ pshufd $68, %xmm0, %xmm7
+ movapd 4240(%ebx), %xmm3
+ pshufd $68, %xmm0, %xmm4
+ andpd 4256(%ebx), %xmm6
+ mulpd %xmm5, %xmm1
+ mulsd %xmm5, %xmm2
+ subpd %xmm6, %xmm4
+ mulpd %xmm5, %xmm7
+ addpd %xmm3, %xmm1
+ pshufd $68, %xmm6, %xmm3
+ mulpd %xmm5, %xmm5
+ mulsd %xmm7, %xmm2
+ mulpd %xmm7, %xmm1
+ pshufd $68, %xmm0, %xmm7
+ mulsd %xmm6, %xmm6
+ addsd %xmm7, %xmm7
+ mulsd %xmm4, %xmm4
+ mulpd %xmm5, %xmm1
+ addsd %xmm0, %xmm7
+ mulsd %xmm3, %xmm6
+ mulsd %xmm3, %xmm7
+ pshufd $238, %xmm1, %xmm3
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm2, %xmm3
+ pshufd $238, %xmm2, %xmm2
+ addsd %xmm4, %xmm7
+ movapd %xmm0, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd %xmm5, %xmm7
+ addsd %xmm6, %xmm0
+ mulsd %xmm2, %xmm7
+ subsd %xmm0, %xmm4
+ addsd %xmm7, %xmm1
+ addsd %xmm4, %xmm6
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_5.0.2:
+ cmpl $16, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ movapd %xmm0, %xmm1
+ mulsd %xmm1, %xmm1
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm2, %xmm2
+ movl $17392, %ecx
+ pinsrw $3, %ecx, %xmm2
+ xorpd %xmm3, %xmm3
+ movl $15344, %edx
+ pinsrw $3, %edx, %xmm3
+ mulsd %xmm0, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm3, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_4.0.2:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_7.0.2
+ xorpd %xmm0, %xmm0
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ orl %edx, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ movl $127, %edx
+.L_2TAG_PACKET_3.0.2:
+ movsd %xmm0, (%esp)
+ movsd 112(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm1
+ andnpd %xmm0, %xmm1
+ mulsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_2.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_8.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(sinh)
+# -- End sinh
+
+# Start file scope ASM
+ALIAS_SYMBOL(sinhl, sinh);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 3706687593
+ .long 1073526560
+ .long 3521726940
+ .long 1014301643
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .long 3607404736
+ .long 1044146952
+ .long 3607404736
+ .long 3191630600
+ .long 4277811695
+ .long 1063661122
+ .long 4277811695
+ .long 3211144770
+ .long 2140175755
+ .long 1033864261
+ .long 2140175755
+ .long 1033864261
+ .long 4289495988
+ .long 1054113747
+ .long 4289495988
+ .long 1054113747
+ .long 4277811695
+ .long 1064709698
+ .long 4277811695
+ .long 1064709698
+ .long 1610612736
+ .long 1080497479
+ .long 4166901572
+ .long 1053077003
+ .long 329805064
+ .long 1038488134
+ .long 2773927730
+ .long 1053236707
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1069897045
+ .long 1744127201
+ .long 1046144581
+ .long 436314137
+ .long 1059717536
+ .long 0
+ .long 4294967280
+ .long 0
+ .long 4294967280
+ .long 4160749568
+ .long 2147483647
+ .type static_const_table,@object
+ .size static_const_table,4280
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/floor.S b/libm/x86/floor.S
new file mode 100644
index 0000000..b859736
--- /dev/null
+++ b/libm/x86/floor.S
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(floor)
+ mov %esp,%eax
+ and $0xfffffff8,%eax
+ movsd 0x4(%esp),%xmm0
+ roundsd $0x1,%xmm0,%xmm0
+ movlpd %xmm0,-0x8(%eax)
+ fldl -0x8(%eax)
+ ret
+END(floor)
+
+ALIAS_SYMBOL(floorl, floor);
diff --git a/libm/x86/floorf.S b/libm/x86/floorf.S
new file mode 100644
index 0000000..79b9073
--- /dev/null
+++ b/libm/x86/floorf.S
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(floorf)
+ movss 0x4(%esp),%xmm0
+ roundss $0x1,%xmm0,%xmm0
+ movss %xmm0,-0x4(%esp)
+ flds -0x4(%esp)
+ ret
+END(floorf)
diff --git a/libm/x86/libm_reduce_pi04l.S b/libm/x86/libm_reduce_pi04l.S
new file mode 100644
index 0000000..af6a7d0
--- /dev/null
+++ b/libm/x86/libm_reduce_pi04l.S
@@ -0,0 +1,3718 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+# -- Begin __libm_reduce_pi04l
+ .text
+ .align 16,0x90
+ .hidden __libm_reduce_pi04l
+ .globl __libm_reduce_pi04l
+__libm_reduce_pi04l:
+# parameter 1: 8 + %ebp
+# parameter 2: 20 + %ebp
+# parameter 3: 24 + %ebp
+..B1.1:
+ pushl %ebp
+ movl %esp, %ebp
+ andl $-16, %esp
+ pushl %esi
+ pushl %edi
+ pushl %ebx
+ subl $20, %esp
+ movzwl 16(%ebp), %ebx
+ andl $32767, %ebx
+ movl 20(%ebp), %eax
+ cmpl $16413, %ebx
+ movl 24(%ebp), %esi
+ call ..L2
+..L2:
+ popl %edi
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi
+ movl %eax, 4(%esp)
+ jge ..B1.8
+..B1.2:
+ fldt 8(%ebp)
+ fldl __4onpi_d@GOTOFF(%edi)
+ fmul %st(1), %st
+ fstpt 8(%esp)
+ movzwl 16(%esp), %ecx
+ negl %ecx
+ addl $30, %ecx
+ movl 12(%esp), %eax
+ shrl %cl, %eax
+ cmpl $0, 4(%esp)
+ jne ..B1.4
+..B1.3:
+ lea 1(%eax), %ecx
+ andl $-2, %ecx
+ jmp ..B1.5
+..B1.4:
+ movl %eax, %ecx
+ addl 4(%esp), %eax
+ movl %eax, %edx
+ andl $1, %edx
+ addl %edx, %ecx
+..B1.5:
+ fldl _TWO_32H@GOTOFF(%edi)
+ cmpl $16400, %ebx
+ movl %ecx, (%esp)
+ fildl (%esp)
+ jge ..B1.7
+..B1.6:
+ fldl _pi04_3d@GOTOFF(%edi)
+ fmul %st(1), %st
+ fsubrp %st, %st(3)
+ fxch %st(1)
+ fmul %st(2), %st
+ fld %st(2)
+ fadd %st(1), %st
+ fsubp %st, %st(1)
+ fld %st(0)
+ fxch %st(1)
+ fsubr %st, %st(3)
+ fldl 8+_pi04_3d@GOTOFF(%edi)
+ fmul %st(3), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ fsub %st(2), %st
+ fsubp %st, %st(1)
+ faddp %st, %st(3)
+ fldl 16+_pi04_3d@GOTOFF(%edi)
+ fmulp %st, %st(2)
+ fld %st(1)
+ fsubr %st(1), %st
+ fsubr %st, %st(1)
+ fxch %st(2)
+ fsubrp %st, %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ jmp ..B1.15
+..B1.7:
+ fldl _pi04_5d@GOTOFF(%edi)
+ fmul %st(1), %st
+ fsubrp %st, %st(3)
+ fxch %st(1)
+ fmul %st(2), %st
+ fld %st(2)
+ fadd %st(1), %st
+ fsubp %st, %st(1)
+ fld %st(0)
+ fxch %st(1)
+ fsubr %st, %st(3)
+ fldl 8+_pi04_5d@GOTOFF(%edi)
+ fmul %st(3), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ fsub %st(2), %st
+ fsubp %st, %st(1)
+ faddp %st, %st(3)
+ fldl 16+_pi04_5d@GOTOFF(%edi)
+ fmul %st(2), %st
+ fld %st(0)
+ fsubr %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ fsubrp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(3)
+ fldl 24+_pi04_5d@GOTOFF(%edi)
+ fmul %st(2), %st
+ fld %st(0)
+ fsubr %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ fsubrp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(3)
+ fldl 32+_pi04_5d@GOTOFF(%edi)
+ fmulp %st, %st(2)
+ fld %st(1)
+ fsubr %st(1), %st
+ fsubr %st, %st(1)
+ fxch %st(2)
+ fsubrp %st, %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ jmp ..B1.15
+..B1.8:
+ fldt 8(%ebp)
+ addl $-16417, %ebx
+ fmull _SCALE@GOTOFF(%edi)
+ movl $-2078209981, %eax
+ imull %ebx
+ addl %ebx, %edx
+ movl %ebx, %ecx
+ sarl $4, %edx
+ sarl $31, %ecx
+ subl %ecx, %edx
+ movl %edx, %eax
+ shll $5, %eax
+ fstpt 8(%ebp)
+ fldt 8(%ebp)
+ subl %edx, %eax
+ movl $0, 8(%ebp)
+ subl %eax, %ebx
+ fldt 8(%ebp)
+ cmpl $17, %ebx
+ fsubr %st, %st(1)
+ jl ..B1.10
+..B1.9:
+ lea (,%edx,8), %eax
+ lea (%eax,%edx,4), %ecx
+ incl %edx
+ fldt __4onpi_31l@GOTOFF(%ecx,%edi)
+ fmul %st(2), %st
+ fldt 12+__4onpi_31l@GOTOFF(%edi,%ecx)
+ fmul %st(2), %st
+ fld %st(0)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fld %st(1)
+ fadd %st(1), %st
+ fstpt 8(%esp)
+ andl $-16777216, 8(%esp)
+ fldt 8(%esp)
+ fsubrp %st, %st(1)
+ jmp ..B1.11
+..B1.10:
+ fldl _zeros@GOTOFF(%edi)
+ fld %st(0)
+..B1.11:
+ fld %st(0)
+ lea (,%edx,8), %eax
+ fld %st(3)
+ lea (%eax,%edx,4), %edx
+ fldt __4onpi_31l@GOTOFF(%edx,%edi)
+ fmul %st(6), %st
+ movl %edx, (%esp)
+ fadd %st, %st(2)
+ fxch %st(2)
+ fsubr %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fldt 12+__4onpi_31l@GOTOFF(%edx,%edi)
+ fmul %st, %st(2)
+ fld %st(2)
+ fadd %st(2), %st
+ fld %st(0)
+ fxch %st(1)
+ fsub %st, %st(3)
+ fxch %st(3)
+ fchs
+ faddp %st, %st(4)
+ fxch %st(3)
+ faddp %st, %st(4)
+ fxch %st(2)
+ fadd %st(3), %st
+ fxch %st(2)
+ fmul %st(5), %st
+ fadd %st, %st(2)
+ fld %st(4)
+ fldt 24+__4onpi_31l@GOTOFF(%edx,%edi)
+ fmul %st, %st(1)
+ fxch %st(1)
+ fadd %st, %st(4)
+ fxch %st(4)
+ fstpt 8(%esp)
+ movzwl 16(%esp), %ebx
+ andl $32767, %ebx
+ cmpl $16415, %ebx
+ jge ..B1.13
+..B1.12:
+ negl %ebx
+ addl $30, %ebx
+ movl %ebx, %ecx
+ movl 12(%esp), %eax
+ shrl %cl, %eax
+ shll %cl, %eax
+ movl %eax, 12(%esp)
+ movl $0, 8(%esp)
+ shrl %cl, %eax
+ jmp ..B1.14
+..B1.13:
+ negl %ebx
+ addl $30, %ebx
+ movl %ebx, %ecx
+ movl 8(%esp), %edx
+ shrl %cl, %edx
+ shll %cl, %edx
+ negl %ecx
+ movl 12(%esp), %eax
+ shll %cl, %eax
+ movl %ebx, %ecx
+ movl %edx, 8(%esp)
+ shrl %cl, %edx
+ orl %edx, %eax
+..B1.14:
+ fldt 8(%esp)
+ addl 4(%esp), %eax
+ fsubrp %st, %st(3)
+ fmul %st(6), %st
+ fld %st(4)
+ movl %eax, %edx
+ andl $1, %edx
+ fadd %st(3), %st
+ movl (%esp), %ecx
+ fsubr %st, %st(3)
+ fxch %st(3)
+ faddp %st, %st(5)
+ fld %st(1)
+ fxch %st(3)
+ faddl zero_none@GOTOFF(%edi,%edx,8)
+ fadd %st, %st(3)
+ fsub %st(3), %st
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(4)
+ fld %st(2)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(3)
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(3)
+ fld %st(0)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fld %st(2)
+ fldt 36+__4onpi_31l@GOTOFF(%ecx,%edi)
+ fmul %st, %st(1)
+ fld %st(1)
+ fadd %st(3), %st
+ fsubr %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fxch %st(1)
+ fmul %st(4), %st
+ fld %st(0)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fld %st(2)
+ fldt 48+__4onpi_31l@GOTOFF(%ecx,%edi)
+ fmul %st, %st(1)
+ fld %st(1)
+ fadd %st(3), %st
+ fsubr %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fld %st(3)
+ fxch %st(2)
+ fmul %st(5), %st
+ fldt 60+__4onpi_31l@GOTOFF(%ecx,%edi)
+ fmul %st, %st(3)
+ fxch %st(3)
+ faddp %st, %st(1)
+ fld %st(0)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(3)
+ fld %st(3)
+ fxch %st(2)
+ fmul %st(5), %st
+ fldt 72+__4onpi_31l@GOTOFF(%ecx,%edi)
+ fmul %st, %st(3)
+ fxch %st(3)
+ faddp %st, %st(1)
+ fld %st(0)
+ fadd %st(2), %st
+ fsubr %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fxch %st(1)
+ faddp %st, %st(3)
+ fxch %st(1)
+ fmulp %st, %st(4)
+ fldt 84+__4onpi_31l@GOTOFF(%edi,%ecx)
+ fmulp %st, %st(3)
+ fxch %st(2)
+ faddp %st, %st(3)
+ fld %st(2)
+ fadd %st(2), %st
+ fldl _TWO_32H@GOTOFF(%edi)
+ fmul %st(1), %st
+ fadd %st, %st(1)
+ fsubrp %st, %st(1)
+ fsubr %st, %st(2)
+ fxch %st(3)
+ faddp %st, %st(2)
+ faddp %st, %st(1)
+ fldl _pi04_2d@GOTOFF(%edi)
+ fld %st(0)
+ fmul %st(2), %st
+ fxch %st(2)
+ fadd %st(3), %st
+ fxch %st(1)
+ fmulp %st, %st(3)
+ fmull 8+_pi04_2d@GOTOFF(%edi)
+ faddp %st, %st(1)
+..B1.15:
+ fldl _TWO_12H@GOTOFF(%edi)
+ fld %st(2)
+ fadd %st(2), %st
+ fmul %st, %st(1)
+ fstpt 8(%esp)
+ fldt 8(%esp)
+ fadd %st(1), %st
+ fsubp %st, %st(1)
+ fstl (%esi)
+ fsubrp %st, %st(2)
+ faddp %st, %st(1)
+ fstpl 8(%esi)
+ addl $20, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+ .align 16,0x90
+ .type __libm_reduce_pi04l,@function
+ .size __libm_reduce_pi04l,.-__libm_reduce_pi04l
+ .data
+# -- End __libm_reduce_pi04l
+ .section .rodata, "a"
+ .align 8
+ .align 8
+zero_none:
+ .long 0x00000000,0x00000000
+ .long 0x00000000,0xbff00000
+ .type zero_none,@object
+ .size zero_none,16
+ .align 4
+__4onpi_d:
+ .long 1841940611
+ .long 1072979760
+ .type __4onpi_d,@object
+ .size __4onpi_d,8
+ .align 4
+_TWO_32H:
+ .long 0
+ .long 1106771968
+ .type _TWO_32H,@object
+ .size _TWO_32H,8
+ .align 4
+_pi04_3d:
+ .long 1413754112
+ .long 1072243195
+ .long 2563527040
+ .long 1021855384
+ .long 3417685868
+ .long 3118450936
+ .type _pi04_3d,@object
+ .size _pi04_3d,24
+ .align 4
+_pi04_5d:
+ .long 1413480448
+ .long 1072243195
+ .long 442499072
+ .long 1036039265
+ .long 771751936
+ .long 999496074
+ .long 622854144
+ .long 963347354
+ .long 1396597664
+ .long 922906692
+ .type _pi04_5d,@object
+ .size _pi04_5d,40
+ .align 4
+_SCALE:
+ .long 0
+ .long 845152256
+ .type _SCALE,@object
+ .size _SCALE,8
+ .align 4
+_zeros:
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .type _zeros,@object
+ .size _zeros,16
+ .align 4
+_pi04_2d:
+ .long 1413480448
+ .long 1072243195
+ .long 442655537
+ .long 1036039265
+ .type _pi04_2d,@object
+ .size _pi04_2d,16
+ .align 4
+_TWO_12H:
+ .long 0
+ .long 1085800448
+ .type _TWO_12H,@object
+ .size _TWO_12H,8
+ .align 2
+__4onpi_31l:
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 0
+ .word 33646
+ .word 41721
+ .word 16600
+ .word 0
+ .word 0
+ .word 0
+ .word 10832
+ .word 40072
+ .word 16567
+ .word 0
+ .word 0
+ .word 0
+ .word 44008
+ .word 65043
+ .word 16537
+ .word 0
+ .word 0
+ .word 0
+ .word 28384
+ .word 64154
+ .word 16505
+ .word 0
+ .word 0
+ .word 0
+ .word 38272
+ .word 56162
+ .word 16472
+ .word 0
+ .word 0
+ .word 0
+ .word 7298
+ .word 51682
+ .word 16445
+ .word 0
+ .word 0
+ .word 0
+ .word 45504
+ .word 65320
+ .word 16409
+ .word 0
+ .word 0
+ .word 0
+ .word 61204
+ .word 44922
+ .word 16382
+ .word 0
+ .word 0
+ .word 0
+ .word 18652
+ .word 50030
+ .word 16351
+ .word 0
+ .word 0
+ .word 0
+ .word 14144
+ .word 59657
+ .word 16318
+ .word 0
+ .word 0
+ .word 0
+ .word 37450
+ .word 47105
+ .word 16290
+ .word 0
+ .word 0
+ .word 0
+ .word 14898
+ .word 56641
+ .word 16259
+ .word 0
+ .word 0
+ .word 0
+ .word 34680
+ .word 34623
+ .word 16226
+ .word 0
+ .word 0
+ .word 0
+ .word 4760
+ .word 45515
+ .word 16196
+ .word 0
+ .word 0
+ .word 0
+ .word 41480
+ .word 40187
+ .word 16166
+ .word 0
+ .word 0
+ .word 0
+ .word 47852
+ .word 55252
+ .word 16134
+ .word 0
+ .word 0
+ .word 0
+ .word 54072
+ .word 35081
+ .word 16103
+ .word 0
+ .word 0
+ .word 0
+ .word 26808
+ .word 57421
+ .word 16071
+ .word 0
+ .word 0
+ .word 0
+ .word 20068
+ .word 57232
+ .word 16042
+ .word 0
+ .word 0
+ .word 0
+ .word 49576
+ .word 60188
+ .word 16009
+ .word 0
+ .word 0
+ .word 0
+ .word 10016
+ .word 52861
+ .word 15978
+ .word 0
+ .word 0
+ .word 0
+ .word 30648
+ .word 35825
+ .word 15947
+ .word 0
+ .word 0
+ .word 0
+ .word 60542
+ .word 58528
+ .word 15918
+ .word 0
+ .word 0
+ .word 0
+ .word 65468
+ .word 61743
+ .word 15887
+ .word 0
+ .word 0
+ .word 0
+ .word 64960
+ .word 45825
+ .word 15851
+ .word 0
+ .word 0
+ .word 0
+ .word 50604
+ .word 38792
+ .word 15825
+ .word 0
+ .word 0
+ .word 0
+ .word 18394
+ .word 33435
+ .word 15794
+ .word 0
+ .word 0
+ .word 0
+ .word 55780
+ .word 42703
+ .word 15763
+ .word 0
+ .word 0
+ .word 0
+ .word 14056
+ .word 63841
+ .word 15731
+ .word 0
+ .word 0
+ .word 0
+ .word 63080
+ .word 62563
+ .word 15700
+ .word 0
+ .word 0
+ .word 0
+ .word 20840
+ .word 62207
+ .word 15669
+ .word 0
+ .word 0
+ .word 0
+ .word 30094
+ .word 59983
+ .word 15639
+ .word 0
+ .word 0
+ .word 0
+ .word 61818
+ .word 60389
+ .word 15608
+ .word 0
+ .word 0
+ .word 0
+ .word 40186
+ .word 40579
+ .word 15577
+ .word 0
+ .word 0
+ .word 0
+ .word 42170
+ .word 58004
+ .word 15546
+ .word 0
+ .word 0
+ .word 0
+ .word 55276
+ .word 39678
+ .word 15514
+ .word 0
+ .word 0
+ .word 0
+ .word 44672
+ .word 36806
+ .word 15481
+ .word 0
+ .word 0
+ .word 0
+ .word 13060
+ .word 34144
+ .word 15452
+ .word 0
+ .word 0
+ .word 0
+ .word 28016
+ .word 57231
+ .word 15419
+ .word 0
+ .word 0
+ .word 0
+ .word 16112
+ .word 44995
+ .word 15390
+ .word 0
+ .word 0
+ .word 0
+ .word 53464
+ .word 33387
+ .word 15358
+ .word 0
+ .word 0
+ .word 0
+ .word 7296
+ .word 60751
+ .word 15325
+ .word 0
+ .word 0
+ .word 0
+ .word 29452
+ .word 45231
+ .word 15297
+ .word 0
+ .word 0
+ .word 0
+ .word 26208
+ .word 49689
+ .word 15266
+ .word 0
+ .word 0
+ .word 0
+ .word 37900
+ .word 44002
+ .word 15235
+ .word 0
+ .word 0
+ .word 0
+ .word 57340
+ .word 33800
+ .word 15204
+ .word 0
+ .word 0
+ .word 0
+ .word 27544
+ .word 50178
+ .word 15173
+ .word 0
+ .word 0
+ .word 0
+ .word 6168
+ .word 40132
+ .word 15142
+ .word 0
+ .word 0
+ .word 0
+ .word 21392
+ .word 43702
+ .word 15109
+ .word 0
+ .word 0
+ .word 0
+ .word 45168
+ .word 54372
+ .word 15081
+ .word 0
+ .word 0
+ .word 0
+ .word 8986
+ .word 40688
+ .word 15050
+ .word 0
+ .word 0
+ .word 0
+ .word 1648
+ .word 53745
+ .word 15018
+ .word 0
+ .word 0
+ .word 0
+ .word 30520
+ .word 55795
+ .word 14986
+ .word 0
+ .word 0
+ .word 0
+ .word 43060
+ .word 32914
+ .word 14956
+ .word 0
+ .word 0
+ .word 0
+ .word 46172
+ .word 52771
+ .word 14925
+ .word 0
+ .word 0
+ .word 0
+ .word 14056
+ .word 45285
+ .word 14893
+ .word 0
+ .word 0
+ .word 0
+ .word 53590
+ .word 44868
+ .word 14864
+ .word 0
+ .word 0
+ .word 0
+ .word 40786
+ .word 35970
+ .word 14833
+ .word 0
+ .word 0
+ .word 0
+ .word 33436
+ .word 65411
+ .word 14801
+ .word 0
+ .word 0
+ .word 0
+ .word 32006
+ .word 61382
+ .word 14771
+ .word 0
+ .word 0
+ .word 0
+ .word 37856
+ .word 45239
+ .word 14738
+ .word 0
+ .word 0
+ .word 0
+ .word 60894
+ .word 49555
+ .word 14709
+ .word 0
+ .word 0
+ .word 0
+ .word 48064
+ .word 53065
+ .word 14674
+ .word 0
+ .word 0
+ .word 0
+ .word 48624
+ .word 54844
+ .word 14647
+ .word 0
+ .word 0
+ .word 0
+ .word 7988
+ .word 40762
+ .word 14616
+ .word 0
+ .word 0
+ .word 0
+ .word 16270
+ .word 58745
+ .word 14585
+ .word 0
+ .word 0
+ .word 0
+ .word 37064
+ .word 50168
+ .word 14553
+ .word 0
+ .word 0
+ .word 0
+ .word 18624
+ .word 63736
+ .word 14519
+ .word 0
+ .word 0
+ .word 0
+ .word 60758
+ .word 44966
+ .word 14492
+ .word 0
+ .word 0
+ .word 0
+ .word 33304
+ .word 47465
+ .word 14461
+ .word 0
+ .word 0
+ .word 0
+ .word 6226
+ .word 60503
+ .word 14430
+ .word 0
+ .word 0
+ .word 0
+ .word 26380
+ .word 54900
+ .word 14398
+ .word 0
+ .word 0
+ .word 0
+ .word 44352
+ .word 49860
+ .word 14368
+ .word 0
+ .word 0
+ .word 0
+ .word 11904
+ .word 42646
+ .word 14337
+ .word 0
+ .word 0
+ .word 0
+ .word 55296
+ .word 50279
+ .word 14300
+ .word 0
+ .word 0
+ .word 0
+ .word 15474
+ .word 50606
+ .word 14275
+ .word 0
+ .word 0
+ .word 0
+ .word 45062
+ .word 44137
+ .word 14244
+ .word 0
+ .word 0
+ .word 0
+ .word 13472
+ .word 36063
+ .word 14210
+ .word 0
+ .word 0
+ .word 0
+ .word 40658
+ .word 53854
+ .word 14182
+ .word 0
+ .word 0
+ .word 0
+ .word 28652
+ .word 43690
+ .word 14151
+ .word 0
+ .word 0
+ .word 0
+ .word 24640
+ .word 64348
+ .word 14118
+ .word 0
+ .word 0
+ .word 0
+ .word 30284
+ .word 41980
+ .word 14088
+ .word 0
+ .word 0
+ .word 0
+ .word 45652
+ .word 38222
+ .word 14057
+ .word 0
+ .word 0
+ .word 0
+ .word 15900
+ .word 62940
+ .word 14026
+ .word 0
+ .word 0
+ .word 0
+ .word 31494
+ .word 50741
+ .word 13996
+ .word 0
+ .word 0
+ .word 0
+ .word 43194
+ .word 55096
+ .word 13965
+ .word 0
+ .word 0
+ .word 0
+ .word 1740
+ .word 45646
+ .word 13933
+ .word 0
+ .word 0
+ .word 0
+ .word 28936
+ .word 44150
+ .word 13903
+ .word 0
+ .word 0
+ .word 0
+ .word 8996
+ .word 42955
+ .word 13872
+ .word 0
+ .word 0
+ .word 0
+ .word 44096
+ .word 61205
+ .word 13839
+ .word 0
+ .word 0
+ .word 0
+ .word 44614
+ .word 54550
+ .word 13810
+ .word 0
+ .word 0
+ .word 0
+ .word 24926
+ .word 57347
+ .word 13779
+ .word 0
+ .word 0
+ .word 0
+ .word 3312
+ .word 61415
+ .word 13745
+ .word 0
+ .word 0
+ .word 0
+ .word 64336
+ .word 63884
+ .word 13717
+ .word 0
+ .word 0
+ .word 0
+ .word 2748
+ .word 62259
+ .word 13685
+ .word 0
+ .word 0
+ .word 0
+ .word 56672
+ .word 51775
+ .word 13653
+ .word 0
+ .word 0
+ .word 0
+ .word 32438
+ .word 55423
+ .word 13624
+ .word 0
+ .word 0
+ .word 0
+ .word 17652
+ .word 45713
+ .word 13593
+ .word 0
+ .word 0
+ .word 0
+ .word 65408
+ .word 51586
+ .word 13558
+ .word 0
+ .word 0
+ .word 0
+ .word 40416
+ .word 55736
+ .word 13531
+ .word 0
+ .word 0
+ .word 0
+ .word 52546
+ .word 37734
+ .word 13500
+ .word 0
+ .word 0
+ .word 0
+ .word 48880
+ .word 64238
+ .word 13469
+ .word 0
+ .word 0
+ .word 0
+ .word 56004
+ .word 46833
+ .word 13437
+ .word 0
+ .word 0
+ .word 0
+ .word 61760
+ .word 38110
+ .word 13405
+ .word 0
+ .word 0
+ .word 0
+ .word 41496
+ .word 35659
+ .word 13374
+ .word 0
+ .word 0
+ .word 0
+ .word 25472
+ .word 41269
+ .word 13342
+ .word 0
+ .word 0
+ .word 0
+ .word 45444
+ .word 36018
+ .word 13314
+ .word 0
+ .word 0
+ .word 0
+ .word 6510
+ .word 56417
+ .word 13283
+ .word 0
+ .word 0
+ .word 0
+ .word 3072
+ .word 56837
+ .word 13252
+ .word 0
+ .word 0
+ .word 0
+ .word 61338
+ .word 48440
+ .word 13221
+ .word 0
+ .word 0
+ .word 0
+ .word 49568
+ .word 57088
+ .word 13189
+ .word 0
+ .word 0
+ .word 0
+ .word 4240
+ .word 39283
+ .word 13157
+ .word 0
+ .word 0
+ .word 0
+ .word 18562
+ .word 33537
+ .word 13128
+ .word 0
+ .word 0
+ .word 0
+ .word 31422
+ .word 44487
+ .word 13097
+ .word 0
+ .word 0
+ .word 0
+ .word 31930
+ .word 60459
+ .word 13066
+ .word 0
+ .word 0
+ .word 0
+ .word 42272
+ .word 36641
+ .word 13033
+ .word 0
+ .word 0
+ .word 0
+ .word 28940
+ .word 36150
+ .word 13004
+ .word 0
+ .word 0
+ .word 0
+ .word 21010
+ .word 50925
+ .word 12973
+ .word 0
+ .word 0
+ .word 0
+ .word 29448
+ .word 64886
+ .word 12941
+ .word 0
+ .word 0
+ .word 0
+ .word 20500
+ .word 54600
+ .word 12911
+ .word 0
+ .word 0
+ .word 0
+ .word 54258
+ .word 46233
+ .word 12880
+ .word 0
+ .word 0
+ .word 0
+ .word 32628
+ .word 42502
+ .word 12848
+ .word 0
+ .word 0
+ .word 0
+ .word 61608
+ .word 55072
+ .word 12818
+ .word 0
+ .word 0
+ .word 0
+ .word 6236
+ .word 57871
+ .word 12786
+ .word 0
+ .word 0
+ .word 0
+ .word 42408
+ .word 34616
+ .word 12756
+ .word 0
+ .word 0
+ .word 0
+ .word 56692
+ .word 51963
+ .word 12724
+ .word 0
+ .word 0
+ .word 0
+ .word 39094
+ .word 48526
+ .word 12694
+ .word 0
+ .word 0
+ .word 0
+ .word 59870
+ .word 38783
+ .word 12663
+ .word 0
+ .word 0
+ .word 0
+ .word 26560
+ .word 33165
+ .word 12632
+ .word 0
+ .word 0
+ .word 0
+ .word 58666
+ .word 37666
+ .word 12601
+ .word 0
+ .word 0
+ .word 0
+ .word 58728
+ .word 39788
+ .word 12569
+ .word 0
+ .word 0
+ .word 0
+ .word 9048
+ .word 43530
+ .word 12538
+ .word 0
+ .word 0
+ .word 0
+ .word 58496
+ .word 57659
+ .word 12505
+ .word 0
+ .word 0
+ .word 0
+ .word 12324
+ .word 37025
+ .word 12477
+ .word 0
+ .word 0
+ .word 0
+ .word 38432
+ .word 55856
+ .word 12445
+ .word 0
+ .word 0
+ .word 0
+ .word 35210
+ .word 45960
+ .word 12415
+ .word 0
+ .word 0
+ .word 0
+ .word 45644
+ .word 51345
+ .word 12384
+ .word 0
+ .word 0
+ .word 0
+ .word 32854
+ .word 63883
+ .word 12353
+ .word 0
+ .word 0
+ .word 0
+ .word 29348
+ .word 41450
+ .word 12321
+ .word 0
+ .word 0
+ .word 0
+ .word 27384
+ .word 38024
+ .word 12289
+ .word 0
+ .word 0
+ .word 0
+ .word 57356
+ .word 57291
+ .word 12260
+ .word 0
+ .word 0
+ .word 0
+ .word 61164
+ .word 51521
+ .word 12228
+ .word 0
+ .word 0
+ .word 0
+ .word 21472
+ .word 59151
+ .word 12196
+ .word 0
+ .word 0
+ .word 0
+ .word 36704
+ .word 39943
+ .word 12165
+ .word 0
+ .word 0
+ .word 0
+ .word 45864
+ .word 50151
+ .word 12136
+ .word 0
+ .word 0
+ .word 0
+ .word 37892
+ .word 63687
+ .word 12104
+ .word 0
+ .word 0
+ .word 0
+ .word 14560
+ .word 51615
+ .word 12073
+ .word 0
+ .word 0
+ .word 0
+ .word 38776
+ .word 55684
+ .word 12041
+ .word 0
+ .word 0
+ .word 0
+ .word 59136
+ .word 53570
+ .word 12010
+ .word 0
+ .word 0
+ .word 0
+ .word 55556
+ .word 37955
+ .word 11981
+ .word 0
+ .word 0
+ .word 0
+ .word 54458
+ .word 44670
+ .word 11950
+ .word 0
+ .word 0
+ .word 0
+ .word 36446
+ .word 34084
+ .word 11919
+ .word 0
+ .word 0
+ .word 0
+ .word 46416
+ .word 51693
+ .word 11886
+ .word 0
+ .word 0
+ .word 0
+ .word 21432
+ .word 34376
+ .word 11857
+ .word 0
+ .word 0
+ .word 0
+ .word 56036
+ .word 34809
+ .word 11826
+ .word 0
+ .word 0
+ .word 0
+ .word 10562
+ .word 55654
+ .word 11795
+ .word 0
+ .word 0
+ .word 0
+ .word 20264
+ .word 53052
+ .word 11763
+ .word 0
+ .word 0
+ .word 0
+ .word 64064
+ .word 50415
+ .word 11729
+ .word 0
+ .word 0
+ .word 0
+ .word 17444
+ .word 48295
+ .word 11701
+ .word 0
+ .word 0
+ .word 0
+ .word 11874
+ .word 52677
+ .word 11671
+ .word 0
+ .word 0
+ .word 0
+ .word 60808
+ .word 39275
+ .word 11640
+ .word 0
+ .word 0
+ .word 0
+ .word 31792
+ .word 55677
+ .word 11606
+ .word 0
+ .word 0
+ .word 0
+ .word 60710
+ .word 49006
+ .word 11578
+ .word 0
+ .word 0
+ .word 0
+ .word 10520
+ .word 37403
+ .word 11546
+ .word 0
+ .word 0
+ .word 0
+ .word 20004
+ .word 59470
+ .word 11515
+ .word 0
+ .word 0
+ .word 0
+ .word 28096
+ .word 37612
+ .word 11485
+ .word 0
+ .word 0
+ .word 0
+ .word 20268
+ .word 44280
+ .word 11453
+ .word 0
+ .word 0
+ .word 0
+ .word 50740
+ .word 61588
+ .word 11422
+ .word 0
+ .word 0
+ .word 0
+ .word 56432
+ .word 58835
+ .word 11390
+ .word 0
+ .word 0
+ .word 0
+ .word 8576
+ .word 42496
+ .word 11355
+ .word 0
+ .word 0
+ .word 0
+ .word 33920
+ .word 54912
+ .word 11324
+ .word 0
+ .word 0
+ .word 0
+ .word 35620
+ .word 54843
+ .word 11298
+ .word 0
+ .word 0
+ .word 0
+ .word 736
+ .word 43591
+ .word 11264
+ .word 0
+ .word 0
+ .word 0
+ .word 39632
+ .word 61060
+ .word 11235
+ .word 0
+ .word 0
+ .word 0
+ .word 63452
+ .word 63129
+ .word 11206
+ .word 0
+ .word 0
+ .word 0
+ .word 56798
+ .word 58512
+ .word 11175
+ .word 0
+ .word 0
+ .word 0
+ .word 13472
+ .word 46333
+ .word 11141
+ .word 0
+ .word 0
+ .word 0
+ .word 37300
+ .word 36598
+ .word 11112
+ .word 0
+ .word 0
+ .word 0
+ .word 41952
+ .word 41639
+ .word 11079
+ .word 0
+ .word 0
+ .word 0
+ .word 52452
+ .word 33459
+ .word 11050
+ .word 0
+ .word 0
+ .word 0
+ .word 58558
+ .word 33287
+ .word 11020
+ .word 0
+ .word 0
+ .word 0
+ .word 7570
+ .word 43843
+ .word 10989
+ .word 0
+ .word 0
+ .word 0
+ .word 59416
+ .word 63990
+ .word 10957
+ .word 0
+ .word 0
+ .word 0
+ .word 65298
+ .word 47744
+ .word 10927
+ .word 0
+ .word 0
+ .word 0
+ .word 21076
+ .word 34089
+ .word 10896
+ .word 0
+ .word 0
+ .word 0
+ .word 7048
+ .word 57394
+ .word 10865
+ .word 0
+ .word 0
+ .word 0
+ .word 12872
+ .word 55405
+ .word 10832
+ .word 0
+ .word 0
+ .word 0
+ .word 12608
+ .word 51669
+ .word 10798
+ .word 0
+ .word 0
+ .word 0
+ .word 5350
+ .word 48455
+ .word 10772
+ .word 0
+ .word 0
+ .word 0
+ .word 23568
+ .word 58692
+ .word 10740
+ .word 0
+ .word 0
+ .word 0
+ .word 40784
+ .word 37046
+ .word 10708
+ .word 0
+ .word 0
+ .word 0
+ .word 38992
+ .word 43861
+ .word 10678
+ .word 0
+ .word 0
+ .word 0
+ .word 10064
+ .word 40199
+ .word 10648
+ .word 0
+ .word 0
+ .word 0
+ .word 26368
+ .word 35771
+ .word 10611
+ .word 0
+ .word 0
+ .word 0
+ .word 23994
+ .word 60721
+ .word 10586
+ .word 0
+ .word 0
+ .word 0
+ .word 25052
+ .word 34302
+ .word 10554
+ .word 0
+ .word 0
+ .word 0
+ .word 39842
+ .word 54964
+ .word 10524
+ .word 0
+ .word 0
+ .word 0
+ .word 11568
+ .word 58277
+ .word 10491
+ .word 0
+ .word 0
+ .word 0
+ .word 26160
+ .word 46438
+ .word 10461
+ .word 0
+ .word 0
+ .word 0
+ .word 23252
+ .word 43049
+ .word 10431
+ .word 0
+ .word 0
+ .word 0
+ .word 35288
+ .word 58000
+ .word 10400
+ .word 0
+ .word 0
+ .word 0
+ .word 14614
+ .word 50216
+ .word 10369
+ .word 0
+ .word 0
+ .word 0
+ .word 1168
+ .word 48804
+ .word 10336
+ .word 0
+ .word 0
+ .word 0
+ .word 60934
+ .word 33006
+ .word 10307
+ .word 0
+ .word 0
+ .word 0
+ .word 64512
+ .word 62247
+ .word 10272
+ .word 0
+ .word 0
+ .word 0
+ .word 59968
+ .word 43121
+ .word 10240
+ .word 0
+ .word 0
+ .word 0
+ .word 25560
+ .word 39974
+ .word 10212
+ .word 0
+ .word 0
+ .word 0
+ .word 1978
+ .word 49353
+ .word 10183
+ .word 0
+ .word 0
+ .word 0
+ .word 16290
+ .word 38807
+ .word 10152
+ .word 0
+ .word 0
+ .word 0
+ .word 8646
+ .word 65226
+ .word 10121
+ .word 0
+ .word 0
+ .word 0
+ .word 56896
+ .word 34317
+ .word 10088
+ .word 0
+ .word 0
+ .word 0
+ .word 40136
+ .word 39118
+ .word 10057
+ .word 0
+ .word 0
+ .word 0
+ .word 14200
+ .word 41756
+ .word 10026
+ .word 0
+ .word 0
+ .word 0
+ .word 59256
+ .word 63202
+ .word 9995
+ .word 0
+ .word 0
+ .word 0
+ .word 22968
+ .word 63553
+ .word 9965
+ .word 0
+ .word 0
+ .word 0
+ .word 736
+ .word 44292
+ .word 9933
+ .word 0
+ .word 0
+ .word 0
+ .word 23186
+ .word 37760
+ .word 9904
+ .word 0
+ .word 0
+ .word 0
+ .word 51008
+ .word 34950
+ .word 9869
+ .word 0
+ .word 0
+ .word 0
+ .word 1664
+ .word 64248
+ .word 9836
+ .word 0
+ .word 0
+ .word 0
+ .word 64352
+ .word 35199
+ .word 9811
+ .word 0
+ .word 0
+ .word 0
+ .word 34656
+ .word 63747
+ .word 9780
+ .word 0
+ .word 0
+ .word 0
+ .word 44330
+ .word 49864
+ .word 9749
+ .word 0
+ .word 0
+ .word 0
+ .word 11654
+ .word 35567
+ .word 9718
+ .word 0
+ .word 0
+ .word 0
+ .word 7924
+ .word 58919
+ .word 9686
+ .word 0
+ .word 0
+ .word 0
+ .word 2532
+ .word 32800
+ .word 9655
+ .word 0
+ .word 0
+ .word 0
+ .word 30024
+ .word 53799
+ .word 9624
+ .word 0
+ .word 0
+ .word 0
+ .word 30172
+ .word 64347
+ .word 9593
+ .word 0
+ .word 0
+ .word 0
+ .word 60036
+ .word 51382
+ .word 9562
+ .word 0
+ .word 0
+ .word 0
+ .word 58576
+ .word 33093
+ .word 9531
+ .word 0
+ .word 0
+ .word 0
+ .word 13888
+ .word 38760
+ .word 9500
+ .word 0
+ .word 0
+ .word 0
+ .word 9322
+ .word 52460
+ .word 9470
+ .word 0
+ .word 0
+ .word 0
+ .word 20944
+ .word 41077
+ .word 9437
+ .word 0
+ .word 0
+ .word 0
+ .word 17976
+ .word 41861
+ .word 9407
+ .word 0
+ .word 0
+ .word 0
+ .word 55176
+ .word 55158
+ .word 9377
+ .word 0
+ .word 0
+ .word 0
+ .word 4976
+ .word 35223
+ .word 9346
+ .word 0
+ .word 0
+ .word 0
+ .word 7816
+ .word 39783
+ .word 9314
+ .word 0
+ .word 0
+ .word 0
+ .word 27656
+ .word 55669
+ .word 9284
+ .word 0
+ .word 0
+ .word 0
+ .word 64944
+ .word 53184
+ .word 9250
+ .word 0
+ .word 0
+ .word 0
+ .word 12544
+ .word 49190
+ .word 9222
+ .word 0
+ .word 0
+ .word 0
+ .word 50612
+ .word 44644
+ .word 9190
+ .word 0
+ .word 0
+ .word 0
+ .word 8832
+ .word 63111
+ .word 9155
+ .word 0
+ .word 0
+ .word 0
+ .word 11744
+ .word 36870
+ .word 9129
+ .word 0
+ .word 0
+ .word 0
+ .word 9404
+ .word 63025
+ .word 9098
+ .word 0
+ .word 0
+ .word 0
+ .word 47316
+ .word 43381
+ .word 9067
+ .word 0
+ .word 0
+ .word 0
+ .word 55716
+ .word 47433
+ .word 9035
+ .word 0
+ .word 0
+ .word 0
+ .word 46414
+ .word 48441
+ .word 9005
+ .word 0
+ .word 0
+ .word 0
+ .word 19116
+ .word 39506
+ .word 8974
+ .word 0
+ .word 0
+ .word 0
+ .word 48060
+ .word 53381
+ .word 8943
+ .word 0
+ .word 0
+ .word 0
+ .word 57112
+ .word 50739
+ .word 8911
+ .word 0
+ .word 0
+ .word 0
+ .word 5840
+ .word 60581
+ .word 8879
+ .word 0
+ .word 0
+ .word 0
+ .word 62112
+ .word 57199
+ .word 8846
+ .word 0
+ .word 0
+ .word 0
+ .word 35908
+ .word 59499
+ .word 8818
+ .word 0
+ .word 0
+ .word 0
+ .word 13760
+ .word 48116
+ .word 8787
+ .word 0
+ .word 0
+ .word 0
+ .word 3136
+ .word 56059
+ .word 8752
+ .word 0
+ .word 0
+ .word 0
+ .word 37596
+ .word 39221
+ .word 8726
+ .word 0
+ .word 0
+ .word 0
+ .word 3232
+ .word 48550
+ .word 8691
+ .word 0
+ .word 0
+ .word 0
+ .word 22872
+ .word 42749
+ .word 8662
+ .word 0
+ .word 0
+ .word 0
+ .word 41948
+ .word 40319
+ .word 8633
+ .word 0
+ .word 0
+ .word 0
+ .word 31196
+ .word 64693
+ .word 8601
+ .word 0
+ .word 0
+ .word 0
+ .word 62052
+ .word 52923
+ .word 8571
+ .word 0
+ .word 0
+ .word 0
+ .word 2750
+ .word 33544
+ .word 8540
+ .word 0
+ .word 0
+ .word 0
+ .word 12462
+ .word 46179
+ .word 8509
+ .word 0
+ .word 0
+ .word 0
+ .word 25128
+ .word 45120
+ .word 8476
+ .word 0
+ .word 0
+ .word 0
+ .word 51634
+ .word 62523
+ .word 8447
+ .word 0
+ .word 0
+ .word 0
+ .word 15758
+ .word 42163
+ .word 8416
+ .word 0
+ .word 0
+ .word 0
+ .word 34022
+ .word 36267
+ .word 8385
+ .word 0
+ .word 0
+ .word 0
+ .word 41252
+ .word 39796
+ .word 8353
+ .word 0
+ .word 0
+ .word 0
+ .word 49782
+ .word 54423
+ .word 8323
+ .word 0
+ .word 0
+ .word 0
+ .word 25428
+ .word 42086
+ .word 8291
+ .word 0
+ .word 0
+ .word 0
+ .word 34388
+ .word 44810
+ .word 8260
+ .word 0
+ .word 0
+ .word 0
+ .word 7456
+ .word 64092
+ .word 8228
+ .word 0
+ .word 0
+ .word 0
+ .word 48336
+ .word 62448
+ .word 8196
+ .word 0
+ .word 0
+ .word 0
+ .word 60912
+ .word 61622
+ .word 8167
+ .word 0
+ .word 0
+ .word 0
+ .word 17852
+ .word 37250
+ .word 8137
+ .word 0
+ .word 0
+ .word 0
+ .word 57940
+ .word 56453
+ .word 8106
+ .word 0
+ .word 0
+ .word 0
+ .word 47256
+ .word 59825
+ .word 8074
+ .word 0
+ .word 0
+ .word 0
+ .word 3774
+ .word 59120
+ .word 8044
+ .word 0
+ .word 0
+ .word 0
+ .word 43448
+ .word 62852
+ .word 8012
+ .word 0
+ .word 0
+ .word 0
+ .word 4840
+ .word 57195
+ .word 7982
+ .word 0
+ .word 0
+ .word 0
+ .word 40862
+ .word 52565
+ .word 7951
+ .word 0
+ .word 0
+ .word 0
+ .word 1440
+ .word 60474
+ .word 7919
+ .word 0
+ .word 0
+ .word 0
+ .word 55520
+ .word 38648
+ .word 7889
+ .word 0
+ .word 0
+ .word 0
+ .word 15316
+ .word 52422
+ .word 7857
+ .word 0
+ .word 0
+ .word 0
+ .word 18704
+ .word 47227
+ .word 7827
+ .word 0
+ .word 0
+ .word 0
+ .word 48892
+ .word 54283
+ .word 7795
+ .word 0
+ .word 0
+ .word 0
+ .word 12670
+ .word 41990
+ .word 7765
+ .word 0
+ .word 0
+ .word 0
+ .word 27570
+ .word 49842
+ .word 7734
+ .word 0
+ .word 0
+ .word 0
+ .word 47230
+ .word 47992
+ .word 7703
+ .word 0
+ .word 0
+ .word 0
+ .word 41020
+ .word 56253
+ .word 7671
+ .word 0
+ .word 0
+ .word 0
+ .word 23404
+ .word 58312
+ .word 7641
+ .word 0
+ .word 0
+ .word 0
+ .word 35176
+ .word 51854
+ .word 7610
+ .word 0
+ .word 0
+ .word 0
+ .word 49188
+ .word 59051
+ .word 7578
+ .word 0
+ .word 0
+ .word 0
+ .word 16656
+ .word 54507
+ .word 7546
+ .word 0
+ .word 0
+ .word 0
+ .word 41320
+ .word 48565
+ .word 7517
+ .word 0
+ .word 0
+ .word 0
+ .word 302
+ .word 42490
+ .word 7486
+ .word 0
+ .word 0
+ .word 0
+ .word 26680
+ .word 39967
+ .word 7454
+ .word 0
+ .word 0
+ .word 0
+ .word 41304
+ .word 43638
+ .word 7424
+ .word 0
+ .word 0
+ .word 0
+ .word 2314
+ .word 48533
+ .word 7393
+ .word 0
+ .word 0
+ .word 0
+ .word 63294
+ .word 35693
+ .word 7362
+ .word 0
+ .word 0
+ .word 0
+ .word 24538
+ .word 48319
+ .word 7331
+ .word 0
+ .word 0
+ .word 0
+ .word 56296
+ .word 47263
+ .word 7300
+ .word 0
+ .word 0
+ .word 0
+ .word 28236
+ .word 38599
+ .word 7268
+ .word 0
+ .word 0
+ .word 0
+ .word 6594
+ .word 62116
+ .word 7238
+ .word 0
+ .word 0
+ .word 0
+ .word 47104
+ .word 63573
+ .word 7198
+ .word 0
+ .word 0
+ .word 0
+ .word 34812
+ .word 34303
+ .word 7176
+ .word 0
+ .word 0
+ .word 0
+ .word 5144
+ .word 33695
+ .word 7145
+ .word 0
+ .word 0
+ .word 0
+ .word 24966
+ .word 55768
+ .word 7114
+ .word 0
+ .word 0
+ .word 0
+ .word 62720
+ .word 43946
+ .word 7078
+ .word 0
+ .word 0
+ .word 0
+ .word 31542
+ .word 56062
+ .word 7052
+ .word 0
+ .word 0
+ .word 0
+ .word 62356
+ .word 59096
+ .word 7020
+ .word 0
+ .word 0
+ .word 0
+ .word 28412
+ .word 40533
+ .word 6990
+ .word 0
+ .word 0
+ .word 0
+ .word 24080
+ .word 50467
+ .word 6958
+ .word 0
+ .word 0
+ .word 0
+ .word 33296
+ .word 46841
+ .word 6925
+ .word 0
+ .word 0
+ .word 0
+ .word 39600
+ .word 38627
+ .word 6897
+ .word 0
+ .word 0
+ .word 0
+ .word 14436
+ .word 37607
+ .word 6865
+ .word 0
+ .word 0
+ .word 0
+ .word 39032
+ .word 56421
+ .word 6833
+ .word 0
+ .word 0
+ .word 0
+ .word 64032
+ .word 54987
+ .word 6804
+ .word 0
+ .word 0
+ .word 0
+ .word 27648
+ .word 42212
+ .word 6768
+ .word 0
+ .word 0
+ .word 0
+ .word 43840
+ .word 46107
+ .word 6739
+ .word 0
+ .word 0
+ .word 0
+ .word 17316
+ .word 36574
+ .word 6711
+ .word 0
+ .word 0
+ .word 0
+ .word 8928
+ .word 37652
+ .word 6677
+ .word 0
+ .word 0
+ .word 0
+ .word 24944
+ .word 47433
+ .word 6648
+ .word 0
+ .word 0
+ .word 0
+ .word 27392
+ .word 57430
+ .word 6616
+ .word 0
+ .word 0
+ .word 0
+ .word 39848
+ .word 43340
+ .word 6585
+ .word 0
+ .word 0
+ .word 0
+ .word 64160
+ .word 43542
+ .word 6555
+ .word 0
+ .word 0
+ .word 0
+ .word 35226
+ .word 63015
+ .word 6525
+ .word 0
+ .word 0
+ .word 0
+ .word 40736
+ .word 64368
+ .word 6493
+ .word 0
+ .word 0
+ .word 0
+ .word 42168
+ .word 49526
+ .word 6462
+ .word 0
+ .word 0
+ .word 0
+ .word 45596
+ .word 34243
+ .word 6432
+ .word 0
+ .word 0
+ .word 0
+ .word 20690
+ .word 39705
+ .word 6401
+ .word 0
+ .word 0
+ .word 0
+ .word 54448
+ .word 46856
+ .word 6368
+ .word 0
+ .word 0
+ .word 0
+ .word 64392
+ .word 62736
+ .word 6337
+ .word 0
+ .word 0
+ .word 0
+ .word 12780
+ .word 56461
+ .word 6307
+ .word 0
+ .word 0
+ .word 0
+ .word 15360
+ .word 49145
+ .word 6277
+ .word 0
+ .word 0
+ .word 0
+ .word 20512
+ .word 49931
+ .word 6242
+ .word 0
+ .word 0
+ .word 0
+ .word 54512
+ .word 55820
+ .word 6212
+ .word 0
+ .word 0
+ .word 0
+ .word 8402
+ .word 39333
+ .word 6184
+ .word 0
+ .word 0
+ .word 0
+ .word 34094
+ .word 53593
+ .word 6153
+ .word 0
+ .word 0
+ .word 0
+ .word 31960
+ .word 38817
+ .word 6121
+ .word 0
+ .word 0
+ .word 0
+ .word 16954
+ .word 39291
+ .word 6091
+ .word 0
+ .word 0
+ .word 0
+ .word 49600
+ .word 48765
+ .word 6056
+ .word 0
+ .word 0
+ .word 0
+ .word 59580
+ .word 56541
+ .word 6029
+ .word 0
+ .word 0
+ .word 0
+ .word 35624
+ .word 44550
+ .word 5998
+ .word 0
+ .word 0
+ .word 0
+ .word 4142
+ .word 47316
+ .word 5967
+ .word 0
+ .word 0
+ .word 0
+ .word 43520
+ .word 43612
+ .word 5935
+ .word 0
+ .word 0
+ .word 0
+ .word 20976
+ .word 40896
+ .word 5902
+ .word 0
+ .word 0
+ .word 0
+ .word 63576
+ .word 57729
+ .word 5874
+ .word 0
+ .word 0
+ .word 0
+ .word 37288
+ .word 33122
+ .word 5843
+ .word 0
+ .word 0
+ .word 0
+ .word 24384
+ .word 52079
+ .word 5809
+ .word 0
+ .word 0
+ .word 0
+ .word 47952
+ .word 58719
+ .word 5779
+ .word 0
+ .word 0
+ .word 0
+ .word 44242
+ .word 55445
+ .word 5750
+ .word 0
+ .word 0
+ .word 0
+ .word 61232
+ .word 38847
+ .word 5716
+ .word 0
+ .word 0
+ .word 0
+ .word 63232
+ .word 46039
+ .word 5683
+ .word 0
+ .word 0
+ .word 0
+ .word 13396
+ .word 42933
+ .word 5657
+ .word 0
+ .word 0
+ .word 0
+ .word 27392
+ .word 43305
+ .word 5622
+ .word 0
+ .word 0
+ .word 0
+ .word 40708
+ .word 35319
+ .word 5595
+ .word 0
+ .word 0
+ .word 0
+ .word 44408
+ .word 55685
+ .word 5564
+ .word 0
+ .word 0
+ .word 0
+ .word 42090
+ .word 44607
+ .word 5533
+ .word 0
+ .word 0
+ .word 0
+ .word 25504
+ .word 53466
+ .word 5500
+ .word 0
+ .word 0
+ .word 0
+ .word 24208
+ .word 33149
+ .word 5470
+ .word 0
+ .word 0
+ .word 0
+ .word 5268
+ .word 45375
+ .word 5440
+ .word 0
+ .word 0
+ .word 0
+ .word 144
+ .word 40000
+ .word 5409
+ .word 0
+ .word 0
+ .word 0
+ .word 56688
+ .word 52358
+ .word 5376
+ .word 0
+ .word 0
+ .word 0
+ .word 25848
+ .word 56175
+ .word 5345
+ .word 0
+ .word 0
+ .word 0
+ .word 57900
+ .word 44055
+ .word 5315
+ .word 0
+ .word 0
+ .word 0
+ .word 24800
+ .word 43437
+ .word 5283
+ .word 0
+ .word 0
+ .word 0
+ .word 17984
+ .word 54872
+ .word 5249
+ .word 0
+ .word 0
+ .word 0
+ .word 25744
+ .word 41345
+ .word 5223
+ .word 0
+ .word 0
+ .word 0
+ .word 7668
+ .word 43682
+ .word 5191
+ .word 0
+ .word 0
+ .word 0
+ .word 47434
+ .word 36705
+ .word 5161
+ .word 0
+ .word 0
+ .word 0
+ .word 20888
+ .word 40323
+ .word 5129
+ .word 0
+ .word 0
+ .word 0
+ .word 3962
+ .word 43032
+ .word 5099
+ .word 0
+ .word 0
+ .word 0
+ .word 50270
+ .word 49260
+ .word 5068
+ .word 0
+ .word 0
+ .word 0
+ .word 20160
+ .word 64041
+ .word 5032
+ .word 0
+ .word 0
+ .word 0
+ .word 25624
+ .word 36013
+ .word 5004
+ .word 0
+ .word 0
+ .word 0
+ .word 48328
+ .word 59345
+ .word 4975
+ .word 0
+ .word 0
+ .word 0
+ .word 51508
+ .word 63920
+ .word 4943
+ .word 0
+ .word 0
+ .word 0
+ .word 27872
+ .word 39135
+ .word 4913
+ .word 0
+ .word 0
+ .word 0
+ .word 13590
+ .word 58857
+ .word 4882
+ .word 0
+ .word 0
+ .word 0
+ .word 50880
+ .word 61323
+ .word 4847
+ .word 0
+ .word 0
+ .word 0
+ .word 44802
+ .word 37181
+ .word 4820
+ .word 0
+ .word 0
+ .word 0
+ .word 53808
+ .word 57813
+ .word 4789
+ .word 0
+ .word 0
+ .word 0
+ .word 64424
+ .word 49714
+ .word 4757
+ .word 0
+ .word 0
+ .word 0
+ .word 31652
+ .word 44011
+ .word 4727
+ .word 0
+ .word 0
+ .word 0
+ .word 28252
+ .word 50834
+ .word 4696
+ .word 0
+ .word 0
+ .word 0
+ .word 30370
+ .word 38742
+ .word 4665
+ .word 0
+ .word 0
+ .word 0
+ .word 57728
+ .word 58403
+ .word 4628
+ .word 0
+ .word 0
+ .word 0
+ .word 35900
+ .word 37112
+ .word 4603
+ .word 0
+ .word 0
+ .word 0
+ .word 40764
+ .word 40914
+ .word 4572
+ .word 0
+ .word 0
+ .word 0
+ .word 21472
+ .word 46910
+ .word 4541
+ .word 0
+ .word 0
+ .word 0
+ .word 17854
+ .word 35030
+ .word 4510
+ .word 0
+ .word 0
+ .word 0
+ .word 4378
+ .word 35776
+ .word 4479
+ .word 0
+ .word 0
+ .word 0
+ .word 57962
+ .word 55295
+ .word 4448
+ .word 0
+ .word 0
+ .word 0
+ .word 64352
+ .word 56717
+ .word 4415
+ .word 0
+ .word 0
+ .word 0
+ .word 37744
+ .word 49416
+ .word 4384
+ .word 0
+ .word 0
+ .word 0
+ .word 38484
+ .word 35759
+ .word 4355
+ .word 0
+ .word 0
+ .word 0
+ .word 55020
+ .word 54969
+ .word 4324
+ .word 0
+ .word 0
+ .word 0
+ .word 9188
+ .word 55223
+ .word 4292
+ .word 0
+ .word 0
+ .word 0
+ .word 6822
+ .word 43079
+ .word 4262
+ .word 0
+ .word 0
+ .word 0
+ .word 48870
+ .word 40943
+ .word 4231
+ .word 0
+ .word 0
+ .word 0
+ .word 9936
+ .word 42731
+ .word 4198
+ .word 0
+ .word 0
+ .word 0
+ .word 23430
+ .word 43136
+ .word 4169
+ .word 0
+ .word 0
+ .word 0
+ .word 4700
+ .word 55665
+ .word 4137
+ .word 0
+ .word 0
+ .word 0
+ .word 8056
+ .word 40216
+ .word 4106
+ .word 0
+ .word 0
+ .word 0
+ .word 3716
+ .word 45403
+ .word 4075
+ .word 0
+ .word 0
+ .word 0
+ .word 53440
+ .word 49488
+ .word 4044
+ .word 0
+ .word 0
+ .word 0
+ .word 41776
+ .word 50188
+ .word 4013
+ .word 0
+ .word 0
+ .word 0
+ .word 20994
+ .word 64556
+ .word 3983
+ .word 0
+ .word 0
+ .word 0
+ .word 16252
+ .word 60661
+ .word 3951
+ .word 0
+ .word 0
+ .word 0
+ .word 61252
+ .word 65021
+ .word 3920
+ .word 0
+ .word 0
+ .word 0
+ .word 16236
+ .word 43803
+ .word 3889
+ .word 0
+ .word 0
+ .word 0
+ .word 63064
+ .word 35308
+ .word 3857
+ .word 0
+ .word 0
+ .word 0
+ .word 49096
+ .word 39848
+ .word 3828
+ .word 0
+ .word 0
+ .word 0
+ .word 15680
+ .word 48673
+ .word 3797
+ .word 0
+ .word 0
+ .word 0
+ .word 48068
+ .word 50957
+ .word 3766
+ .word 0
+ .word 0
+ .word 0
+ .word 20824
+ .word 56086
+ .word 3734
+ .word 0
+ .word 0
+ .word 0
+ .word 46504
+ .word 43224
+ .word 3704
+ .word 0
+ .word 0
+ .word 0
+ .word 52428
+ .word 46094
+ .word 3672
+ .word 0
+ .word 0
+ .word 0
+ .word 17548
+ .word 52066
+ .word 3642
+ .word 0
+ .word 0
+ .word 0
+ .word 61738
+ .word 35565
+ .word 3611
+ .word 0
+ .word 0
+ .word 0
+ .word 31184
+ .word 50588
+ .word 3579
+ .word 0
+ .word 0
+ .word 0
+ .word 1716
+ .word 52681
+ .word 3549
+ .word 0
+ .word 0
+ .word 0
+ .word 44656
+ .word 43385
+ .word 3518
+ .word 0
+ .word 0
+ .word 0
+ .word 12668
+ .word 43259
+ .word 3486
+ .word 0
+ .word 0
+ .word 0
+ .word 24544
+ .word 35408
+ .word 3453
+ .word 0
+ .word 0
+ .word 0
+ .word 28854
+ .word 65018
+ .word 3425
+ .word 0
+ .word 0
+ .word 0
+ .word 5696
+ .word 40391
+ .word 3393
+ .word 0
+ .word 0
+ .word 0
+ .word 39580
+ .word 56400
+ .word 3363
+ .word 0
+ .word 0
+ .word 0
+ .word 20428
+ .word 39579
+ .word 3332
+ .word 0
+ .word 0
+ .word 0
+ .word 32328
+ .word 36727
+ .word 3301
+ .word 0
+ .word 0
+ .word 0
+ .word 34020
+ .word 54457
+ .word 3270
+ .word 0
+ .word 0
+ .word 0
+ .word 34016
+ .word 48400
+ .word 3238
+ .word 0
+ .word 0
+ .word 0
+ .word 6922
+ .word 51417
+ .word 3208
+ .word 0
+ .word 0
+ .word 0
+ .word 27208
+ .word 64641
+ .word 3176
+ .word 0
+ .word 0
+ .word 0
+ .word 1802
+ .word 48886
+ .word 3146
+ .word 0
+ .word 0
+ .word 0
+ .word 35440
+ .word 61590
+ .word 3115
+ .word 0
+ .word 0
+ .word 0
+ .word 60610
+ .word 51604
+ .word 3084
+ .word 0
+ .word 0
+ .word 0
+ .word 5440
+ .word 38199
+ .word 3050
+ .word 0
+ .word 0
+ .word 0
+ .word 6914
+ .word 43867
+ .word 3022
+ .word 0
+ .word 0
+ .word 0
+ .word 24000
+ .word 45256
+ .word 2989
+ .word 0
+ .word 0
+ .word 0
+ .word 51496
+ .word 57396
+ .word 2959
+ .word 0
+ .word 0
+ .word 0
+ .word 11538
+ .word 46256
+ .word 2929
+ .word 0
+ .word 0
+ .word 0
+ .word 36802
+ .word 48020
+ .word 2898
+ .word 0
+ .word 0
+ .word 0
+ .word 57910
+ .word 57903
+ .word 2867
+ .word 0
+ .word 0
+ .word 0
+ .word 47484
+ .word 48798
+ .word 2835
+ .word 0
+ .word 0
+ .word 0
+ .word 57766
+ .word 57709
+ .word 2805
+ .word 0
+ .word 0
+ .word 0
+ .word 54064
+ .word 47856
+ .word 2774
+ .word 0
+ .word 0
+ .word 0
+ .word 49340
+ .word 48080
+ .word 2743
+ .word 0
+ .word 0
+ .word 0
+ .word 36454
+ .word 56731
+ .word 2712
+ .word 0
+ .word 0
+ .word 0
+ .word 51548
+ .word 63385
+ .word 2681
+ .word 0
+ .word 0
+ .word 0
+ .word 56000
+ .word 48716
+ .word 2645
+ .word 0
+ .word 0
+ .word 0
+ .word 44992
+ .word 50040
+ .word 2615
+ .word 0
+ .word 0
+ .word 0
+ .word 43136
+ .word 58177
+ .word 2585
+ .word 0
+ .word 0
+ .word 0
+ .word 49730
+ .word 33270
+ .word 2557
+ .word 0
+ .word 0
+ .word 0
+ .word 29808
+ .word 51063
+ .word 2526
+ .word 0
+ .word 0
+ .word 0
+ .word 25276
+ .word 46724
+ .word 2494
+ .word 0
+ .word 0
+ .word 0
+ .word 17324
+ .word 35928
+ .word 2463
+ .word 0
+ .word 0
+ .word 0
+ .word 52284
+ .word 63916
+ .word 2433
+ .word 0
+ .word 0
+ .word 0
+ .word 5414
+ .word 46704
+ .word 2402
+ .word 0
+ .word 0
+ .word 0
+ .word 51710
+ .word 57168
+ .word 2371
+ .word 0
+ .word 0
+ .word 0
+ .word 27366
+ .word 49253
+ .word 2340
+ .word 0
+ .word 0
+ .word 0
+ .word 45332
+ .word 53033
+ .word 2309
+ .word 0
+ .word 0
+ .word 0
+ .word 54152
+ .word 37418
+ .word 2276
+ .word 0
+ .word 0
+ .word 0
+ .word 53076
+ .word 47398
+ .word 2247
+ .word 0
+ .word 0
+ .word 0
+ .word 14374
+ .word 59477
+ .word 2216
+ .word 0
+ .word 0
+ .word 0
+ .word 59336
+ .word 33435
+ .word 2184
+ .word 0
+ .word 0
+ .word 0
+ .word 21612
+ .word 43267
+ .word 2154
+ .word 0
+ .word 0
+ .word 0
+ .word 34664
+ .word 39372
+ .word 2121
+ .word 0
+ .word 0
+ .word 0
+ .word 172
+ .word 62761
+ .word 2091
+ .word 0
+ .word 0
+ .word 0
+ .word 9816
+ .word 40715
+ .word 2060
+ .word 0
+ .word 0
+ .word 0
+ .word 65116
+ .word 40481
+ .word 2030
+ .word 0
+ .word 0
+ .word 0
+ .word 28066
+ .word 39184
+ .word 1999
+ .word 0
+ .word 0
+ .word 0
+ .word 37408
+ .word 63923
+ .word 1968
+ .word 0
+ .word 0
+ .word 0
+ .word 15760
+ .word 42305
+ .word 1937
+ .word 0
+ .word 0
+ .word 0
+ .word 28236
+ .word 59340
+ .word 1905
+ .word 0
+ .word 0
+ .word 0
+ .word 43258
+ .word 59402
+ .word 1875
+ .word 0
+ .word 0
+ .word 0
+ .word 19988
+ .word 50087
+ .word 1844
+ .word 0
+ .word 0
+ .word 0
+ .word 63456
+ .word 47833
+ .word 1810
+ .word 0
+ .word 0
+ .word 0
+ .word 65184
+ .word 61426
+ .word 1781
+ .word 0
+ .word 0
+ .word 0
+ .word 52982
+ .word 48456
+ .word 1751
+ .word 0
+ .word 0
+ .word 0
+ .word 30020
+ .word 62809
+ .word 1719
+ .word 0
+ .word 0
+ .word 0
+ .word 9096
+ .word 63061
+ .word 1688
+ .word 0
+ .word 0
+ .word 0
+ .word 59648
+ .word 44374
+ .word 1654
+ .word 0
+ .word 0
+ .word 0
+ .word 11456
+ .word 33847
+ .word 1625
+ .word 0
+ .word 0
+ .word 0
+ .word 12392
+ .word 50500
+ .word 1595
+ .word 0
+ .word 0
+ .word 0
+ .word 56432
+ .word 59196
+ .word 1563
+ .word 0
+ .word 0
+ .word 0
+ .word 61008
+ .word 40265
+ .word 1532
+ .word 0
+ .word 0
+ .word 0
+ .word 37842
+ .word 33270
+ .word 1503
+ .word 0
+ .word 0
+ .word 0
+ .word 37916
+ .word 44543
+ .word 1471
+ .word 0
+ .word 0
+ .word 0
+ .word 11490
+ .word 36421
+ .word 1441
+ .word 0
+ .word 0
+ .word 0
+ .word 19040
+ .word 38397
+ .word 1409
+ .word 0
+ .word 0
+ .word 0
+ .word 31224
+ .word 47162
+ .word 1379
+ .word 0
+ .word 0
+ .word 0
+ .word 52056
+ .word 41461
+ .word 1347
+ .word 0
+ .word 0
+ .word 0
+ .word 10810
+ .word 56374
+ .word 1317
+ .word 0
+ .word 0
+ .word 0
+ .word 5358
+ .word 35086
+ .word 1286
+ .word 0
+ .word 0
+ .word 0
+ .word 36640
+ .word 50226
+ .word 1251
+ .word 0
+ .word 0
+ .word 0
+ .word 33856
+ .word 45597
+ .word 1222
+ .word 0
+ .word 0
+ .word 0
+ .word 21552
+ .word 63128
+ .word 1191
+ .word 0
+ .word 0
+ .word 0
+ .word 1198
+ .word 35616
+ .word 1162
+ .word 0
+ .word 0
+ .word 0
+ .word 1232
+ .word 59506
+ .word 1131
+ .word 0
+ .word 0
+ .word 0
+ .word 51086
+ .word 34963
+ .word 1100
+ .word 0
+ .word 0
+ .word 0
+ .word 3960
+ .word 39061
+ .word 1067
+ .word 0
+ .word 0
+ .word 0
+ .word 4564
+ .word 57134
+ .word 1037
+ .word 0
+ .word 0
+ .word 0
+ .word 59468
+ .word 35285
+ .word 1007
+ .word 0
+ .word 0
+ .word 0
+ .word 63422
+ .word 35431
+ .word 976
+ .word 0
+ .word 0
+ .word 0
+ .word 38352
+ .word 51462
+ .word 945
+ .word 0
+ .word 0
+ .word 0
+ .word 25806
+ .word 55660
+ .word 914
+ .word 0
+ .word 0
+ .word 0
+ .word 38842
+ .word 41327
+ .word 883
+ .word 0
+ .word 0
+ .word 0
+ .word 17980
+ .word 50458
+ .word 852
+ .word 0
+ .word 0
+ .word 0
+ .word 61194
+ .word 59710
+ .word 821
+ .word 0
+ .word 0
+ .word 0
+ .word 21098
+ .word 42086
+ .word 790
+ .word 0
+ .word 0
+ .word 0
+ .word 16704
+ .word 43341
+ .word 757
+ .word 0
+ .word 0
+ .word 0
+ .word 46316
+ .word 52840
+ .word 728
+ .word 0
+ .word 0
+ .word 0
+ .word 20386
+ .word 33936
+ .word 697
+ .word 0
+ .word 0
+ .word 0
+ .word 20064
+ .word 51864
+ .word 664
+ .word 0
+ .word 0
+ .word 0
+ .word 2268
+ .word 57500
+ .word 634
+ .word 0
+ .word 0
+ .word 0
+ .word 11152
+ .word 51171
+ .word 604
+ .word 0
+ .word 0
+ .word 0
+ .word 23164
+ .word 63727
+ .word 572
+ .word 0
+ .word 0
+ .word 0
+ .word 20514
+ .word 40280
+ .word 542
+ .word 0
+ .word 0
+ .word 0
+ .word 21818
+ .word 57922
+ .word 511
+ .word 0
+ .word 0
+ .word 0
+ .word 32366
+ .word 46413
+ .word 480
+ .word 0
+ .word 0
+ .word 0
+ .word 53972
+ .word 43148
+ .word 449
+ .word 0
+ .word 0
+ .word 0
+ .word 30134
+ .word 65133
+ .word 418
+ .word 0
+ .word 0
+ .word 0
+ .word 15282
+ .word 61516
+ .word 387
+ .word 0
+ .word 0
+ .word 0
+ .word 49872
+ .word 49222
+ .word 355
+ .word 0
+ .word 0
+ .word 0
+ .word 9484
+ .word 63958
+ .word 325
+ .word 0
+ .word 0
+ .word 0
+ .word 47028
+ .word 35341
+ .word 294
+ .word 0
+ .word 0
+ .word 0
+ .word 6770
+ .word 58613
+ .word 263
+ .word 0
+ .word 0
+ .word 0
+ .word 33372
+ .word 43448
+ .word 232
+ .word 0
+ .word 0
+ .word 0
+ .word 27792
+ .word 51629
+ .word 198
+ .word 0
+ .word 0
+ .word 0
+ .word 19712
+ .word 53691
+ .word 170
+ .word 0
+ .word 0
+ .word 0
+ .word 42144
+ .word 60929
+ .word 135
+ .word 0
+ .word 0
+ .word 0
+ .word 35240
+ .word 48799
+ .word 107
+ .word 0
+ .word 0
+ .word 0
+ .word 910
+ .word 51212
+ .word 77
+ .word 0
+ .word 0
+ .word 0
+ .word 65062
+ .word 33668
+ .word 46
+ .word 0
+ .word 0
+ .word 0
+ .word 52624
+ .word 51799
+ .word 14
+ .word 0
+ .type __4onpi_31l,@object
+ .size __4onpi_31l,6444
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/libm_sincos_huge.S b/libm/x86/libm_sincos_huge.S
new file mode 100644
index 0000000..b43d193
--- /dev/null
+++ b/libm/x86/libm_sincos_huge.S
@@ -0,0 +1,668 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+# -- Begin __libm_sincos_huge
+ .text
+ .align 16,0x90
+ .hidden __libm_sincos_huge
+ .globl __libm_sincos_huge
+__libm_sincos_huge:
+# parameter 1: 8 + %ebp
+# parameter 2: 16 + %ebp
+# parameter 3: 20 + %ebp
+..B1.1:
+ pushl %ebp
+ movl %esp, %ebp
+ andl $-64, %esp
+ pushl %esi
+ pushl %edi
+ pushl %ebx
+ subl $52, %esp
+ movl 16(%ebp), %eax
+ movl 20(%ebp), %edx
+ movl %eax, 32(%esp)
+ movl %edx, 36(%esp)
+..B1.2:
+ fnstcw 30(%esp)
+..B1.3:
+ call ..L2
+..L2:
+ popl %edi
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi
+ movsd 8(%ebp), %xmm1
+ movl 12(%ebp), %esi
+ movl %esi, %eax
+ andl $2147483647, %eax
+ andps .L_2il0floatpacket.0@GOTOFF(%edi), %xmm1
+ shrl $31, %esi
+ movl %eax, 40(%esp)
+ cmpl $1104150528, %eax
+ movsd %xmm1, 8(%ebp)
+ jae ..B1.11
+..B1.4:
+ movsd _Pi4Inv@GOTOFF(%edi), %xmm0
+ mulsd %xmm1, %xmm0
+ movzwl 30(%esp), %edx
+ movl %edx, %eax
+ andl $768, %eax
+ movsd %xmm0, (%esp)
+ cmpl $768, %eax
+ je ..B1.42
+..B1.5:
+ orl $-64768, %edx
+ movw %dx, 28(%esp)
+..B1.6:
+ fldcw 28(%esp)
+..B1.7:
+ movsd 8(%ebp), %xmm1
+ movl $1, %ebx
+..B1.8:
+ movl %ebx, 12(%esp)
+ movl 4(%esp), %ebx
+ movl %ebx, %eax
+ movl %esi, 8(%esp)
+ movl %ebx, %esi
+ shrl $20, %esi
+ andl $1048575, %eax
+ movl %esi, %ecx
+ orl $1048576, %eax
+ negl %ecx
+ movl %eax, %edx
+ addl $19, %ecx
+ addl $13, %esi
+ movl %ecx, 24(%esp)
+ shrl %cl, %edx
+ movl %esi, %ecx
+ shll %cl, %eax
+ movl 24(%esp), %ecx
+ movl (%esp), %esi
+ shrl %cl, %esi
+ orl %esi, %eax
+ cmpl $1094713344, %ebx
+ movsd %xmm1, 16(%esp)
+ fldl 16(%esp)
+ cmovb %edx, %eax
+ movl 8(%esp), %esi
+ lea 1(%eax), %edx
+ movl %edx, %ebx
+ andl $-2, %ebx
+ movl %ebx, 16(%esp)
+ fildl 16(%esp)
+ movl 12(%esp), %ebx
+ cmpl $1094713344, 40(%esp)
+ jae ..B1.10
+..B1.9:
+ fldl _Pi4x3@GOTOFF(%edi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 8+_Pi4x3@GOTOFF(%edi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 16+_Pi4x3@GOTOFF(%edi)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ jmp ..B1.17
+..B1.10:
+ fldl _Pi4x4@GOTOFF(%edi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 8+_Pi4x4@GOTOFF(%edi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 16+_Pi4x4@GOTOFF(%edi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 24+_Pi4x4@GOTOFF(%edi)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ jmp ..B1.17
+..B1.11:
+ movzwl 30(%esp), %edx
+ movl %edx, %eax
+ andl $768, %eax
+ cmpl $768, %eax
+ je ..B1.43
+..B1.12:
+ orl $-64768, %edx
+ movw %dx, 28(%esp)
+..B1.13:
+ fldcw 28(%esp)
+..B1.14:
+ movsd 8(%ebp), %xmm1
+ movl $1, %ebx
+..B1.15:
+ movsd %xmm1, 16(%esp)
+ fldl 16(%esp)
+ addl $-32, %esp
+ lea 32(%esp), %eax
+ fstpt (%esp)
+ movl $0, 12(%esp)
+ movl %eax, 16(%esp)
+ call __libm_reduce_pi04l
+..B1.46:
+ addl $32, %esp
+..B1.16:
+ fldl (%esp)
+ lea 1(%eax), %edx
+ fldl 8(%esp)
+ faddp %st, %st(1)
+..B1.17:
+ movl %edx, %ecx
+ addl $3, %eax
+ shrl $2, %ecx
+ andl $1, %ecx
+ shrl $2, %eax
+ xorl %ecx, %esi
+ movl 36(%esp), %ecx
+ andl $1, %eax
+ andl $3, %ecx
+ cmpl $3, %ecx
+ jne ..B1.25
+..B1.18:
+ fldt 84+_SP@GOTOFF(%edi)
+ fld %st(1)
+ fmul %st(2), %st
+ testb $2, %dl
+ fmul %st, %st(1)
+ fldt 72+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 60+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 48+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 36+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 24+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 12+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt _SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fmul %st, %st(1)
+ fldt 84+_CP@GOTOFF(%edi)
+ fmul %st(1), %st
+ fldt 72+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 60+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 48+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 36+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 24+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 12+_CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt _CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmulp %st, %st(1)
+ fldl _ones@GOTOFF(%edi,%esi,8)
+ fldl _ones@GOTOFF(%edi,%eax,8)
+ je ..B1.22
+..B1.19:
+ fmulp %st, %st(4)
+ testl %ebx, %ebx
+ fxch %st(2)
+ fmul %st(3), %st
+ movl 32(%esp), %eax
+ faddp %st, %st(3)
+ fxch %st(2)
+ fstpl (%eax)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ fstpl 8(%eax)
+ je ..B1.21
+..B1.20:
+ fldcw 30(%esp)
+..B1.21:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.22:
+ fxch %st(1)
+ fmulp %st, %st(4)
+ testl %ebx, %ebx
+ fxch %st(2)
+ fmul %st(3), %st
+ movl 32(%esp), %eax
+ faddp %st, %st(3)
+ fxch %st(2)
+ fstpl 8(%eax)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ fstpl (%eax)
+ je ..B1.24
+..B1.23:
+ fldcw 30(%esp)
+..B1.24:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.25:
+ testb $2, 36(%esp)
+ je ..B1.33
+..B1.26:
+ fld %st(0)
+ testb $2, %dl
+ fmul %st(1), %st
+ fld %st(0)
+ fmul %st(1), %st
+ je ..B1.30
+..B1.27:
+ fstp %st(2)
+ fldt 84+_CP@GOTOFF(%edi)
+ testl %ebx, %ebx
+ fmul %st(2), %st
+ fldt 72+_CP@GOTOFF(%edi)
+ fmul %st(3), %st
+ fldt 60+_CP@GOTOFF(%edi)
+ movl 32(%esp), %eax
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 48+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 36+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 24+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 12+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(3)
+ fldt _CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ fldl _ones@GOTOFF(%edi,%esi,8)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ fstpl 8(%eax)
+ je ..B1.29
+..B1.28:
+ fldcw 30(%esp)
+..B1.29:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.30:
+ fldt 84+_SP@GOTOFF(%edi)
+ testl %ebx, %ebx
+ fmul %st(1), %st
+ fldt 72+_SP@GOTOFF(%edi)
+ fmul %st(2), %st
+ fldt 60+_SP@GOTOFF(%edi)
+ movl 32(%esp), %eax
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 48+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 36+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 24+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 12+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(2)
+ fldt _SP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmulp %st, %st(2)
+ faddp %st, %st(1)
+ fldl _ones@GOTOFF(%edi,%esi,8)
+ fmulp %st, %st(2)
+ fmul %st(1), %st
+ faddp %st, %st(1)
+ fstpl 8(%eax)
+ je ..B1.32
+..B1.31:
+ fldcw 30(%esp)
+..B1.32:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.33:
+ testb $1, 36(%esp)
+ je ..B1.41
+..B1.34:
+ fld %st(0)
+ testb $2, %dl
+ fmul %st(1), %st
+ fld %st(0)
+ fmul %st(1), %st
+ je ..B1.38
+..B1.35:
+ fldt 84+_SP@GOTOFF(%edi)
+ testl %ebx, %ebx
+ fmul %st(1), %st
+ fldt 72+_SP@GOTOFF(%edi)
+ fmul %st(2), %st
+ fldt 60+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 48+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 36+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 24+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 12+_SP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(2)
+ fldt _SP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmulp %st, %st(2)
+ faddp %st, %st(1)
+ fldl _ones@GOTOFF(%edi,%eax,8)
+ fmulp %st, %st(2)
+ fmul %st(1), %st
+ movl 32(%esp), %eax
+ faddp %st, %st(1)
+ fstpl (%eax)
+ je ..B1.37
+..B1.36:
+ fldcw 30(%esp)
+..B1.37:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.38:
+ fstp %st(2)
+ fldt 84+_CP@GOTOFF(%edi)
+ testl %ebx, %ebx
+ fmul %st(2), %st
+ fldt 72+_CP@GOTOFF(%edi)
+ fmul %st(3), %st
+ fldt 60+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 48+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 36+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 24+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(3), %st
+ fldt 12+_CP@GOTOFF(%edi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(3)
+ fldt _CP@GOTOFF(%edi)
+ faddp %st, %st(1)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ fldl _ones@GOTOFF(%edi,%eax,8)
+ fmul %st, %st(1)
+ movl 32(%esp), %eax
+ faddp %st, %st(1)
+ fstpl (%eax)
+ je ..B1.40
+..B1.39:
+ fldcw 30(%esp)
+..B1.40:
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.41:
+ fstp %st(0)
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.42:
+ xorl %ebx, %ebx
+ jmp ..B1.8
+..B1.43:
+ xorl %ebx, %ebx
+ jmp ..B1.15
+ .align 16,0x90
+ .type __libm_sincos_huge,@function
+ .size __libm_sincos_huge,.-__libm_sincos_huge
+ .data
+# -- End __libm_sincos_huge
+ .section .rodata, "a"
+ .align 16
+ .align 16
+.L_2il0floatpacket.0:
+ .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
+ .type .L_2il0floatpacket.0,@object
+ .size .L_2il0floatpacket.0,16
+ .align 16
+_Pi4Inv:
+ .long 1841940611
+ .long 1072979760
+ .type _Pi4Inv,@object
+ .size _Pi4Inv,8
+ .space 8, 0x00 # pad
+ .align 16
+_Pi4x3:
+ .long 1413754880
+ .long 3219726843
+ .long 993632256
+ .long 1027030475
+ .long 3773204808
+ .long 3129236486
+ .type _Pi4x3,@object
+ .size _Pi4x3,24
+ .space 8, 0x00 # pad
+ .align 16
+_Pi4x4:
+ .long 1413480448
+ .long 3219726843
+ .long 442499072
+ .long 3183522913
+ .long 771751936
+ .long 3146979722
+ .long 622873025
+ .long 3110831002
+ .type _Pi4x4,@object
+ .size _Pi4x4,32
+ .align 16
+_SP:
+ .word 43691
+ .word 43690
+ .word 43690
+ .word 43690
+ .word 49148
+ .word 0
+ .word 34951
+ .word 34952
+ .word 34952
+ .word 34952
+ .word 16376
+ .word 0
+ .word 50471
+ .word 3328
+ .word 208
+ .word 53261
+ .word 49138
+ .word 0
+ .word 17910
+ .word 46614
+ .word 7466
+ .word 47343
+ .word 16364
+ .word 0
+ .word 33371
+ .word 14743
+ .word 11071
+ .word 55090
+ .word 49125
+ .word 0
+ .word 48947
+ .word 35764
+ .word 12250
+ .word 45202
+ .word 16350
+ .word 0
+ .word 17574
+ .word 60698
+ .word 10735
+ .word 55102
+ .word 49110
+ .word 0
+ .word 34320
+ .word 12415
+ .word 25249
+ .word 51489
+ .word 16334
+ .word 0
+ .type _SP,@object
+ .size _SP,96
+ .align 16
+_CP:
+ .word 0
+ .word 0
+ .word 0
+ .word 32768
+ .word 49150
+ .word 0
+ .word 43685
+ .word 43690
+ .word 43690
+ .word 43690
+ .word 16378
+ .word 0
+ .word 39983
+ .word 2912
+ .word 24758
+ .word 46603
+ .word 49141
+ .word 0
+ .word 61476
+ .word 3244
+ .word 208
+ .word 53261
+ .word 16367
+ .word 0
+ .word 1022
+ .word 16229
+ .word 32187
+ .word 37874
+ .word 49129
+ .word 0
+ .word 55373
+ .word 44526
+ .word 50840
+ .word 36726
+ .word 16354
+ .word 0
+ .word 55994
+ .word 65145
+ .word 59958
+ .word 51657
+ .word 49114
+ .word 0
+ .word 15046
+ .word 2976
+ .word 1998
+ .word 54661
+ .word 16338
+ .word 0
+ .type _CP,@object
+ .size _CP,96
+ .align 16
+_ones:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 3220176896
+ .type _ones,@object
+ .size _ones,16
+ .data
+ .hidden __libm_reduce_pi04l
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/libm_tancot_huge.S b/libm/x86/libm_tancot_huge.S
new file mode 100644
index 0000000..80f16d5
--- /dev/null
+++ b/libm/x86/libm_tancot_huge.S
@@ -0,0 +1,750 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+# -- Begin __libm_tancot_huge
+ .text
+ .align 16,0x90
+ .hidden __libm_tancot_huge
+ .globl __libm_tancot_huge
+__libm_tancot_huge:
+# parameter 1: 8 + %ebp
+# parameter 2: 16 + %ebp
+# parameter 3: 20 + %ebp
+..B1.1:
+ pushl %ebp
+ movl %esp, %ebp
+ andl $-64, %esp
+ pushl %esi
+ pushl %edi
+ pushl %ebx
+ subl $52, %esp
+ movl 16(%ebp), %eax
+ movl 20(%ebp), %ebx
+ movl %eax, 40(%esp)
+..B1.2:
+ fnstcw 38(%esp)
+..B1.3:
+ movl 12(%ebp), %edx
+ movl %edx, %eax
+ andl $2147483647, %eax
+ shrl $31, %edx
+ movl %edx, 44(%esp)
+ cmpl $1104150528, %eax
+ call ..L2
+..L2:
+ popl %esi
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi
+ jae ..B1.11
+..B1.4:
+ movsd 8(%ebp), %xmm1
+ movzwl 38(%esp), %ecx
+ movl %ecx, %edx
+ andl $768, %edx
+ andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm1
+ cmpl $768, %edx
+ movsd _Pi4Inv@GOTOFF(%esi), %xmm0
+ mulsd %xmm1, %xmm0
+ movsd %xmm1, 8(%ebp)
+ movsd %xmm0, (%esp)
+ je ..B1.39
+..B1.5:
+ orl $-64768, %ecx
+ movw %cx, 36(%esp)
+..B1.6:
+ fldcw 36(%esp)
+..B1.7:
+ movsd 8(%ebp), %xmm1
+ movl $1, %edi
+..B1.8:
+ movl %esi, 12(%esp)
+ movl 4(%esp), %esi
+ movl %esi, %edx
+ movl %edi, 24(%esp)
+ movl %esi, %edi
+ shrl $20, %edi
+ andl $1048575, %edx
+ movl %edi, %ecx
+ orl $1048576, %edx
+ negl %ecx
+ addl $13, %edi
+ movl %ebx, 8(%esp)
+ addl $19, %ecx
+ movl %edx, %ebx
+ movl %ecx, 28(%esp)
+ shrl %cl, %ebx
+ movl %edi, %ecx
+ shll %cl, %edx
+ movl 28(%esp), %ecx
+ movl (%esp), %edi
+ shrl %cl, %edi
+ orl %edi, %edx
+ cmpl $1094713344, %esi
+ movsd %xmm1, 16(%esp)
+ fldl 16(%esp)
+ cmovb %ebx, %edx
+ movl 24(%esp), %edi
+ movl 12(%esp), %esi
+ lea 1(%edx), %ebx
+ andl $-2, %ebx
+ movl %ebx, 16(%esp)
+ cmpl $1094713344, %eax
+ fildl 16(%esp)
+ movl 8(%esp), %ebx
+ jae ..B1.10
+..B1.9:
+ fldl _Pi4x3@GOTOFF(%esi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 8+_Pi4x3@GOTOFF(%esi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 16+_Pi4x3@GOTOFF(%esi)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ jmp ..B1.17
+..B1.10:
+ fldl _Pi4x4@GOTOFF(%esi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 8+_Pi4x4@GOTOFF(%esi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 16+_Pi4x4@GOTOFF(%esi)
+ fmul %st(1), %st
+ faddp %st, %st(2)
+ fldl 24+_Pi4x4@GOTOFF(%esi)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ jmp ..B1.17
+..B1.11:
+ movzwl 38(%esp), %edx
+ movl %edx, %eax
+ andl $768, %eax
+ cmpl $768, %eax
+ je ..B1.40
+..B1.12:
+ orl $-64768, %edx
+ movw %dx, 36(%esp)
+..B1.13:
+ fldcw 36(%esp)
+..B1.14:
+ movl $1, %edi
+..B1.15:
+ movsd 8(%ebp), %xmm0
+ addl $-32, %esp
+ andps .L_2il0floatpacket.0@GOTOFF(%esi), %xmm0
+ lea 32(%esp), %eax
+ movsd %xmm0, 16(%eax)
+ fldl 16(%eax)
+ fstpt (%esp)
+ movl $0, 12(%esp)
+ movl %eax, 16(%esp)
+ call __libm_reduce_pi04l
+..B1.43:
+ movl %eax, %edx
+ addl $32, %esp
+..B1.16:
+ fldl (%esp)
+ fldl 8(%esp)
+ faddp %st, %st(1)
+..B1.17:
+ movl %ebx, %eax
+ andl $3, %eax
+ cmpl $3, %eax
+ jne ..B1.24
+..B1.18:
+ fldl _ones@GOTOFF(%esi)
+ incl %edx
+ fdiv %st(1), %st
+ testb $2, %dl
+ fstpt 24(%esp)
+ fld %st(0)
+ fmul %st(1), %st
+ fld %st(0)
+ fmul %st(1), %st
+ fldt 36+_TP@GOTOFF(%esi)
+ fmul %st(2), %st
+ fldt 24+_TP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt 12+_TP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt 36+_TQ@GOTOFF(%esi)
+ fmul %st(3), %st
+ fldt 24+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(3), %st
+ fldt 12+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(3), %st
+ fldt _TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fldt _TP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fldt 132+_GP@GOTOFF(%esi)
+ fmul %st(3), %st
+ fldt 120+_GP@GOTOFF(%esi)
+ fmul %st(4), %st
+ fldt 108+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 96+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 84+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 72+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 60+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 48+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 36+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(4), %st
+ fldt 24+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(4)
+ fldt 12+_GP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(4), %st
+ fmul %st(5), %st
+ fldt _GP@GOTOFF(%esi)
+ faddp %st, %st(4)
+ fxch %st(3)
+ fmul %st(5), %st
+ faddp %st, %st(3)
+ je ..B1.20
+..B1.19:
+ fldt 24(%esp)
+ fxch %st(1)
+ fdivrp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(3)
+ movl 44(%esp), %eax
+ xorl $1, %eax
+ fxch %st(2)
+ fmul %st(3), %st
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(2)
+ fmul %st, %st(3)
+ fxch %st(3)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fstpl 16(%esp)
+ fmul %st(1), %st
+ fxch %st(1)
+ fmulp %st, %st(2)
+ movsd 16(%esp), %xmm0
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm1
+ jmp ..B1.21
+..B1.20:
+ fdivrp %st, %st(1)
+ fmulp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ movl 44(%esp), %eax
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(1)
+ fmul %st, %st(3)
+ fxch %st(3)
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ fmul %st(1), %st
+ fldt 24(%esp)
+ fmulp %st, %st(2)
+ movsd 16(%esp), %xmm0
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm1
+..B1.21:
+ testl %edi, %edi
+ je ..B1.23
+..B1.22:
+ fldcw 38(%esp)
+..B1.23:
+ movl 40(%esp), %eax
+ movsd %xmm0, (%eax)
+ movsd %xmm1, 8(%eax)
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.24:
+ testb $2, %bl
+ je ..B1.31
+..B1.25:
+ incl %edx
+ fld %st(0)
+ fmul %st(1), %st
+ testb $2, %dl
+ je ..B1.27
+..B1.26:
+ fldl _ones@GOTOFF(%esi)
+ fdiv %st(2), %st
+ fld %st(1)
+ fmul %st(2), %st
+ fldt 132+_GP@GOTOFF(%esi)
+ fmul %st(1), %st
+ fldt 120+_GP@GOTOFF(%esi)
+ fmul %st(2), %st
+ fldt 108+_GP@GOTOFF(%esi)
+ movl 44(%esp), %eax
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ xorl $1, %eax
+ fldt 96+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 84+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 72+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 60+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 48+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 36+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 24+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(2)
+ fldt 12+_GP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmulp %st, %st(3)
+ fldt _GP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(3), %st
+ fxch %st(2)
+ fmulp %st, %st(3)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(2)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm0
+ jmp ..B1.28
+..B1.27:
+ fldt 36+_TP@GOTOFF(%esi)
+ fmul %st(1), %st
+ fldt 24+_TP@GOTOFF(%esi)
+ movl 44(%esp), %eax
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ fldt 36+_TQ@GOTOFF(%esi)
+ fmul %st(2), %st
+ fldt 24+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt 12+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt _TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fldt 12+_TP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt _TP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fdivp %st, %st(1)
+ fmulp %st, %st(1)
+ fmul %st(1), %st
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(1)
+ fmulp %st, %st(2)
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm0
+..B1.28:
+ testl %edi, %edi
+ je ..B1.30
+..B1.29:
+ fldcw 38(%esp)
+..B1.30:
+ movl 40(%esp), %eax
+ movsd %xmm0, (%eax)
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.31:
+ testb $1, %bl
+ je ..B1.38
+..B1.32:
+ incl %edx
+ fld %st(0)
+ fmul %st(1), %st
+ testb $2, %dl
+ je ..B1.34
+..B1.33:
+ fldt 36+_TP@GOTOFF(%esi)
+ fmul %st(1), %st
+ fldt 24+_TP@GOTOFF(%esi)
+ movl 44(%esp), %eax
+ faddp %st, %st(1)
+ fmul %st(1), %st
+ xorl $1, %eax
+ fldt 36+_TQ@GOTOFF(%esi)
+ fmul %st(2), %st
+ fldt 24+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt 12+_TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(2), %st
+ fldt _TQ@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fldt 12+_TP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt _TP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fdivp %st, %st(1)
+ fmulp %st, %st(1)
+ fmul %st(1), %st
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(1)
+ fmulp %st, %st(2)
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm0
+ jmp ..B1.35
+..B1.34:
+ fldl _ones@GOTOFF(%esi)
+ fdiv %st(2), %st
+ fld %st(1)
+ fmul %st(2), %st
+ fldt 132+_GP@GOTOFF(%esi)
+ fmul %st(1), %st
+ fldt 120+_GP@GOTOFF(%esi)
+ fmul %st(2), %st
+ fldt 108+_GP@GOTOFF(%esi)
+ movl 44(%esp), %eax
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 96+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 84+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 72+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 60+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 48+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 36+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmul %st(2), %st
+ fldt 24+_GP@GOTOFF(%esi)
+ faddp %st, %st(2)
+ fxch %st(1)
+ fmulp %st, %st(2)
+ fldt 12+_GP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmulp %st, %st(3)
+ fldt _GP@GOTOFF(%esi)
+ faddp %st, %st(1)
+ fmul %st(3), %st
+ fxch %st(2)
+ fmulp %st, %st(3)
+ fxch %st(1)
+ faddp %st, %st(2)
+ fldl _ones@GOTOFF(%esi,%eax,8)
+ fmul %st, %st(2)
+ fmulp %st, %st(1)
+ faddp %st, %st(1)
+ fstpl 16(%esp)
+ movsd 16(%esp), %xmm0
+..B1.35:
+ testl %edi, %edi
+ je ..B1.37
+..B1.36:
+ fldcw 38(%esp)
+..B1.37:
+ movl 40(%esp), %eax
+ movsd %xmm0, 8(%eax)
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.38:
+ fstp %st(0)
+ addl $52, %esp
+ popl %ebx
+ popl %edi
+ popl %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B1.39:
+ xorl %edi, %edi
+ jmp ..B1.8
+..B1.40:
+ xorl %edi, %edi
+ jmp ..B1.15
+ .align 16,0x90
+ .type __libm_tancot_huge,@function
+ .size __libm_tancot_huge,.-__libm_tancot_huge
+ .data
+# -- End __libm_tancot_huge
+ .section .rodata, "a"
+ .align 16
+ .align 16
+.L_2il0floatpacket.0:
+ .long 0xffffffff,0x7fffffff,0x00000000,0x00000000
+ .type .L_2il0floatpacket.0,@object
+ .size .L_2il0floatpacket.0,16
+ .align 16
+_Pi4Inv:
+ .long 1841940611
+ .long 1072979760
+ .type _Pi4Inv,@object
+ .size _Pi4Inv,8
+ .space 8, 0x00 # pad
+ .align 16
+_Pi4x3:
+ .long 1413754880
+ .long 3219726843
+ .long 993632256
+ .long 1027030475
+ .long 3773204808
+ .long 3129236486
+ .type _Pi4x3,@object
+ .size _Pi4x3,24
+ .space 8, 0x00 # pad
+ .align 16
+_Pi4x4:
+ .long 1413480448
+ .long 3219726843
+ .long 442499072
+ .long 3183522913
+ .long 771751936
+ .long 3146979722
+ .long 622873025
+ .long 3110831002
+ .type _Pi4x4,@object
+ .size _Pi4x4,32
+ .align 16
+_ones:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 3220176896
+ .type _ones,@object
+ .size _ones,16
+ .align 16
+_TP:
+ .word 19670
+ .word 44908
+ .word 50960
+ .word 50786
+ .word 49149
+ .word 0
+ .word 19206
+ .word 45228
+ .word 54194
+ .word 52268
+ .word 16377
+ .word 0
+ .word 227
+ .word 51280
+ .word 43560
+ .word 38195
+ .word 49139
+ .word 0
+ .word 12272
+ .word 18029
+ .word 6715
+ .word 45670
+ .word 16357
+ .word 0
+ .type _TP,@object
+ .size _TP,48
+ .align 16
+_TQ:
+ .word 14748
+ .word 33681
+ .word 5452
+ .word 38090
+ .word 49151
+ .word 0
+ .word 46755
+ .word 50026
+ .word 17634
+ .word 35372
+ .word 16382
+ .word 0
+ .word 46863
+ .word 53352
+ .word 42702
+ .word 59869
+ .word 49145
+ .word 0
+ .word 33295
+ .word 20942
+ .word 32118
+ .word 39935
+ .word 16371
+ .word 0
+ .type _TQ,@object
+ .size _TQ,48
+ .align 16
+_GP:
+ .word 43691
+ .word 43690
+ .word 43690
+ .word 43690
+ .word 49149
+ .word 0
+ .word 46639
+ .word 2912
+ .word 24758
+ .word 46603
+ .word 49145
+ .word 0
+ .word 57255
+ .word 2218
+ .word 21984
+ .word 35507
+ .word 49142
+ .word 0
+ .word 34208
+ .word 43033
+ .word 48281
+ .word 56811
+ .word 49138
+ .word 0
+ .word 28773
+ .word 27191
+ .word 31071
+ .word 45908
+ .word 49135
+ .word 0
+ .word 43257
+ .word 33777
+ .word 11976
+ .word 37184
+ .word 49132
+ .word 0
+ .word 62410
+ .word 35990
+ .word 36363
+ .word 60269
+ .word 49128
+ .word 0
+ .word 13659
+ .word 55568
+ .word 26569
+ .word 48851
+ .word 49125
+ .word 0
+ .word 10347
+ .word 46238
+ .word 47188
+ .word 39576
+ .word 49122
+ .word 0
+ .word 2161
+ .word 6703
+ .word 25719
+ .word 64708
+ .word 49118
+ .word 0
+ .word 42329
+ .word 7593
+ .word 44754
+ .word 47734
+ .word 49115
+ .word 0
+ .word 163
+ .word 32746
+ .word 39875
+ .word 61957
+ .word 49112
+ .word 0
+ .type _GP,@object
+ .size _GP,144
+ .data
+ .hidden __libm_reduce_pi04l
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_atan.S b/libm/x86/s_atan.S
new file mode 100644
index 0000000..c4413f1
--- /dev/null
+++ b/libm/x86/s_atan.S
@@ -0,0 +1,934 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// This implementation uses the main path for |x| in [2^{-5},2^65).
+// For |x| in [2^{-64},2^{-5}), a secondary path is used.
+// For the biased exponent of X within 3FFH-64 and 3FF+64, we use one branch.
+// We use the following definition of B and X` so that the formula
+// atan(X) = Tau + atan( (X`-B) / (One + BX) ) is correct
+//
+// X = (-1)^s * 2^k * 1. x1 x2 ... x52
+//
+// Define X` = 0 if k >= 5; and X` = |X| otherwise
+// Define One = 0 if k >= 5; and One = 1 otherwise
+// Define B = 0 if k <= -6; B = 2^k * 1.x1 x2 x3 x4 1 if -5 <= k <= 4
+// Define B = 2^5 * 1.0 0 ... 0 if k >= 5
+//
+// Tau is 0 if k <= -6;
+// Tau is atan( B ) if -5 <= k <= 4
+// Tau is pi/2 if k >= 5
+//
+// Special cases:
+// atan(NaN) = quiet NaN
+// atan(+/-INF) = +/-Pi/2
+// atan(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin atan
+ENTRY(atan)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 48(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ movsd 2640(%ebx), %xmm3
+ movsd 2624(%ebx), %xmm5
+ movsd 2656(%ebx), %xmm4
+ movsd %xmm0, 8(%esp)
+ pextrw $3, %xmm0, %edx
+ andpd %xmm0, %xmm3
+ pshufd $68, %xmm0, %xmm1
+ orpd %xmm4, %xmm3
+ movl %edx, %eax
+ andl $32767, %edx
+ subl $16288, %edx
+ cmpl $159, %edx
+ ja .L_2TAG_PACKET_0.0.2
+ mulsd %xmm3, %xmm1
+ subsd %xmm3, %xmm0
+ addsd %xmm5, %xmm1
+ divsd %xmm1, %xmm0
+ addl $1, %edx
+ movsd 2672(%ebx), %xmm2
+ movsd 2688(%ebx), %xmm4
+ andl $32768, %eax
+ xorpd %xmm7, %xmm7
+ pinsrw $3, %eax, %xmm7
+ addl %edx, %edx
+ movsd (%ebx,%edx,8), %xmm6
+ movsd 8(%ebx,%edx,8), %xmm5
+ xorpd %xmm7, %xmm5
+ xorpd %xmm7, %xmm6
+ movsd 2680(%ebx), %xmm7
+ pshufd $68, %xmm0, %xmm1
+ mulsd %xmm0, %xmm0
+ pshufd $68, %xmm1, %xmm3
+ addsd %xmm6, %xmm1
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm4
+ subsd %xmm1, %xmm6
+ mulsd %xmm0, %xmm4
+ addsd %xmm7, %xmm2
+ mulsd %xmm3, %xmm0
+ addsd %xmm3, %xmm6
+ mulsd %xmm2, %xmm0
+ addsd 2696(%ebx), %xmm4
+ addsd %xmm5, %xmm6
+ mulsd %xmm4, %xmm0
+ addsd %xmm6, %xmm0
+ addsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ addl $944, %edx
+ cmpl $1103, %edx
+ ja .L_2TAG_PACKET_2.0.2
+ movsd 2672(%ebx), %xmm4
+ movsd 2688(%ebx), %xmm7
+ movsd 8(%esp), %xmm0
+ mulsd %xmm1, %xmm1
+ movsd 2680(%ebx), %xmm2
+ movsd 2696(%ebx), %xmm5
+ mulsd %xmm1, %xmm4
+ addsd %xmm1, %xmm7
+ movapd %xmm1, %xmm6
+ mulsd %xmm0, %xmm1
+ addsd %xmm4, %xmm2
+ mulsd %xmm6, %xmm7
+ mulsd %xmm1, %xmm2
+ addsd %xmm5, %xmm7
+ mulsd %xmm7, %xmm2
+ addsd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ addl $15344, %edx
+ cmpl $16368, %edx
+ ja .L_2TAG_PACKET_3.0.2
+ movsd 8(%esp), %xmm0
+ movsd 8(%esp), %xmm1
+ cmpl $16, %edx
+ jae .L_2TAG_PACKET_4.0.2
+ mulsd %xmm0, %xmm1
+.L_2TAG_PACKET_4.0.2:
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_3.0.2:
+ cmpl $17392, %edx
+ jae .L_2TAG_PACKET_5.0.2
+ xorpd %xmm1, %xmm1
+ movl $49136, %ecx
+ pinsrw $3, %ecx, %xmm1
+ divsd %xmm0, %xmm1
+ movsd 2672(%ebx), %xmm2
+ movsd 2688(%ebx), %xmm4
+ andl $32768, %eax
+ xorpd %xmm7, %xmm7
+ pinsrw $3, %eax, %xmm7
+ addl %edx, %edx
+ movsd 2592(%ebx), %xmm6
+ movsd 2600(%ebx), %xmm5
+ xorpd %xmm7, %xmm5
+ xorpd %xmm7, %xmm6
+ movsd 2680(%ebx), %xmm7
+ pshufd $68, %xmm1, %xmm0
+ mulsd %xmm1, %xmm1
+ pshufd $68, %xmm0, %xmm3
+ addsd %xmm6, %xmm0
+ mulsd %xmm1, %xmm2
+ addsd %xmm1, %xmm4
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm4
+ addsd %xmm7, %xmm2
+ mulsd %xmm3, %xmm1
+ addsd %xmm3, %xmm6
+ mulsd %xmm2, %xmm1
+ addsd 2696(%ebx), %xmm4
+ addsd %xmm5, %xmm6
+ mulsd %xmm4, %xmm1
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_5.0.2:
+ movsd 8(%esp), %xmm4
+ movsd 2608(%ebx), %xmm0
+ movsd 2592(%ebx), %xmm2
+ movsd 2600(%ebx), %xmm3
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ andl $2147483647, %edx
+ cmpl $2146435072, %edx
+ jae .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_7.0.2:
+ andnpd %xmm4, %xmm0
+ orpd %xmm0, %xmm2
+ orpd %xmm3, %xmm0
+ addsd %xmm2, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_6.0.2:
+ subl $2146435072, %edx
+ orl %edx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_7.0.2
+ movapd %xmm4, %xmm0
+ addsd %xmm0, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+.L_2TAG_PACKET_1.0.2:
+ movl 48(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(atan)
+# -- End atan
+
+# Start file scope ASM
+ALIAS_SYMBOL(atanl, atan);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3819695742
+ .long 1067482761
+ .long 2398680355
+ .long 3155462074
+ .long 2998791009
+ .long 1067548225
+ .long 3868465248
+ .long 3157182472
+ .long 3339424991
+ .long 1067613680
+ .long 3296670360
+ .long 1010752543
+ .long 2710002256
+ .long 1067679126
+ .long 3403896007
+ .long 1010910768
+ .long 3275701428
+ .long 1067744562
+ .long 119959933
+ .long 1011482843
+ .long 2908636881
+ .long 1067809988
+ .long 2464489612
+ .long 1011545526
+ .long 3777889398
+ .long 1067875403
+ .long 3262682165
+ .long 1009703919
+ .long 3759667419
+ .long 1067940807
+ .long 1838130851
+ .long 3157373556
+ .long 732369940
+ .long 1068006200
+ .long 1203428313
+ .long 1010055371
+ .long 1166616461
+ .long 1068071580
+ .long 2901274051
+ .long 3158549977
+ .long 2945472892
+ .long 1068136947
+ .long 3726120658
+ .long 1009762715
+ .long 3954480976
+ .long 1068202301
+ .long 1289173457
+ .long 1009429861
+ .long 2081752829
+ .long 1068267642
+ .long 1836909874
+ .long 1006212095
+ .long 3807999788
+ .long 1068332968
+ .long 2172459940
+ .long 3156162078
+ .long 2731789884
+ .long 1068398280
+ .long 3450718392
+ .long 3159216547
+ .long 1044477961
+ .long 1068463577
+ .long 2230553229
+ .long 1011424339
+ .long 1486930287
+ .long 1068530218
+ .long 2861547474
+ .long 1012041376
+ .long 2293016881
+ .long 1068595466
+ .long 136843272
+ .long 1012684797
+ .long 201518157
+ .long 1068660680
+ .long 63231984
+ .long 1012427198
+ .long 4054234584
+ .long 1068725856
+ .long 3927006960
+ .long 1011878955
+ .long 1246477213
+ .long 1068790995
+ .long 1494265652
+ .long 3155219350
+ .long 678186699
+ .long 1068856093
+ .long 1264361424
+ .long 3159256693
+ .long 2690594995
+ .long 1068921148
+ .long 3906996379
+ .long 1009288267
+ .long 3362611517
+ .long 1068986159
+ .long 1650970041
+ .long 3158331771
+ .long 3102162111
+ .long 1069051124
+ .long 365917035
+ .long 3160264153
+ .long 2352611067
+ .long 1069116041
+ .long 4008970190
+ .long 3159478182
+ .long 1594134794
+ .long 1069180908
+ .long 466690178
+ .long 1012526501
+ .long 1345079306
+ .long 1069245723
+ .long 2268273568
+ .long 3160164092
+ .long 2163300970
+ .long 1069310484
+ .long 2750834800
+ .long 3158113482
+ .long 352522716
+ .long 1069375190
+ .long 1750411372
+ .long 1011790845
+ .long 848541647
+ .long 1069439838
+ .long 2164207573
+ .long 1011698350
+ .long 40647312
+ .long 1069504427
+ .long 2949165434
+ .long 3159107267
+ .long 2216766270
+ .long 1069574357
+ .long 2197920765
+ .long 3161055954
+ .long 1090914384
+ .long 1069638757
+ .long 2330454674
+ .long 1013365998
+ .long 387601244
+ .long 1069703022
+ .long 3185681168
+ .long 1013434071
+ .long 3991640484
+ .long 1069767144
+ .long 1313211590
+ .long 3161087959
+ .long 3322489502
+ .long 1069831118
+ .long 3013977995
+ .long 1013053011
+ .long 3121698570
+ .long 1069894936
+ .long 4069015667
+ .long 1013023362
+ .long 4289964660
+ .long 1069958591
+ .long 1736191156
+ .long 3158266731
+ .long 3903312386
+ .long 1070022077
+ .long 1833592413
+ .long 3159731471
+ .long 3818449864
+ .long 1070085387
+ .long 851036429
+ .long 3159730451
+ .long 2097480306
+ .long 1070148515
+ .long 3506390884
+ .long 3160462302
+ .long 1611694502
+ .long 1070211454
+ .long 2785735540
+ .long 3160465144
+ .long 1464694796
+ .long 1070274198
+ .long 4229277299
+ .long 3159907000
+ .long 1299612775
+ .long 1070336741
+ .long 4116653788
+ .long 3160427739
+ .long 1310544789
+ .long 1070399077
+ .long 1064430331
+ .long 1013218202
+ .long 2253168030
+ .long 1070461200
+ .long 1405044609
+ .long 3157623179
+ .long 1159567373
+ .long 1070523105
+ .long 2353445521
+ .long 3159992176
+ .long 1359373750
+ .long 1070605818
+ .long 1748171336
+ .long 3161879263
+ .long 908341706
+ .long 1070667034
+ .long 3372710815
+ .long 3161775245
+ .long 1743027350
+ .long 1070727765
+ .long 687089934
+ .long 3160507171
+ .long 2055355646
+ .long 1070787992
+ .long 2392855242
+ .long 1013682469
+ .long 690426164
+ .long 1070847697
+ .long 1103926666
+ .long 1014052810
+ .long 1483247847
+ .long 1070906862
+ .long 2082645847
+ .long 3161345479
+ .long 392040270
+ .long 1070965472
+ .long 2407720023
+ .long 1014053754
+ .long 2673846014
+ .long 1071023511
+ .long 1293605532
+ .long 3158464385
+ .long 1384215810
+ .long 1071080967
+ .long 2446095872
+ .long 3159216407
+ .long 3101660631
+ .long 1071137826
+ .long 698040758
+ .long 1014855328
+ .long 2094057058
+ .long 1071194078
+ .long 2282048339
+ .long 1014040385
+ .long 1712750594
+ .long 1071249712
+ .long 1204372378
+ .long 3162276464
+ .long 1411515787
+ .long 1071304719
+ .long 949080808
+ .long 1015006403
+ .long 931538085
+ .long 1071359091
+ .long 3027127039
+ .long 1014307233
+ .long 179139065
+ .long 1071412821
+ .long 4285547492
+ .long 3161934731
+ .long 3387721259
+ .long 1071465902
+ .long 373225773
+ .long 1013486625
+ .long 2132236852
+ .long 1071544299
+ .long 3250533429
+ .long 1014031677
+ .long 1942070284
+ .long 1071645596
+ .long 1237964179
+ .long 3163239113
+ .long 1532707802
+ .long 1071695380
+ .long 330645583
+ .long 1012495610
+ .long 2294184979
+ .long 1071743834
+ .long 3959472897
+ .long 1015833116
+ .long 3805060714
+ .long 1071790961
+ .long 2671256142
+ .long 1013727772
+ .long 2215037898
+ .long 1071836770
+ .long 2683359117
+ .long 1015831902
+ .long 483661594
+ .long 1071881273
+ .long 836288326
+ .long 3162648643
+ .long 1534679894
+ .long 1071924486
+ .long 373258696
+ .long 3162470096
+ .long 1538714628
+ .long 1071966430
+ .long 3199433068
+ .long 1015325501
+ .long 527642555
+ .long 1072007128
+ .long 3636832592
+ .long 3161843145
+ .long 291339150
+ .long 1072046605
+ .long 890169537
+ .long 3160586117
+ .long 2450210201
+ .long 1072084888
+ .long 1636353294
+ .long 3163193400
+ .long 2411367951
+ .long 1072122007
+ .long 374899873
+ .long 1011331750
+ .long 681549971
+ .long 1072157992
+ .long 506411689
+ .long 1015373954
+ .long 1466745541
+ .long 1072192873
+ .long 2143860931
+ .long 1013364334
+ .long 2845622366
+ .long 1072226682
+ .long 2869178209
+ .long 3162423682
+ .long 2838871438
+ .long 1072275456
+ .long 3742223599
+ .long 1014338577
+ .long 4200275274
+ .long 1072337034
+ .long 1566539915
+ .long 3161839550
+ .long 3034733530
+ .long 1072394897
+ .long 652621408
+ .long 3162261964
+ .long 3207412993
+ .long 1072449290
+ .long 3206124665
+ .long 1014408733
+ .long 624461478
+ .long 1072500450
+ .long 932437485
+ .long 1015204343
+ .long 767665908
+ .long 1072548600
+ .long 1037911952
+ .long 3163527627
+ .long 1110773639
+ .long 1072593952
+ .long 2371517912
+ .long 3160465741
+ .long 1940828530
+ .long 1072636704
+ .long 2731408428
+ .long 3162895795
+ .long 1911329388
+ .long 1072677041
+ .long 1773089615
+ .long 3159569267
+ .long 1764715788
+ .long 1072704191
+ .long 691346949
+ .long 3164069946
+ .long 3332979233
+ .long 1072722195
+ .long 3550733983
+ .long 1014770628
+ .long 1321870254
+ .long 1072739231
+ .long 1415315820
+ .long 1016224052
+ .long 3657429030
+ .long 1072755365
+ .long 3910539033
+ .long 1015966402
+ .long 4197624557
+ .long 1072770661
+ .long 2333399254
+ .long 3164546480
+ .long 1512059493
+ .long 1072785177
+ .long 2701510318
+ .long 1016178092
+ .long 453379037
+ .long 1072798965
+ .long 4046344253
+ .long 3162814364
+ .long 1942345162
+ .long 1072818388
+ .long 621134147
+ .long 1016335195
+ .long 4210176273
+ .long 1072842164
+ .long 2701013387
+ .long 3164326619
+ .long 4185644010
+ .long 1072863795
+ .long 4163699341
+ .long 1016203112
+ .long 679688788
+ .long 1072883543
+ .long 4147276762
+ .long 1014066750
+ .long 29432865
+ .long 1072901630
+ .long 970415797
+ .long 1016902063
+ .long 4070721092
+ .long 1072918247
+ .long 2539004411
+ .long 3163736096
+ .long 2252468843
+ .long 1072933561
+ .long 3424082887
+ .long 3163407177
+ .long 2929724825
+ .long 1072947712
+ .long 3661482235
+ .long 3163846989
+ .long 1377513368
+ .long 1072960824
+ .long 3987926680
+ .long 1013647908
+ .long 1031632908
+ .long 1072973003
+ .long 3672217151
+ .long 1016614619
+ .long 2516508130
+ .long 1072984342
+ .long 545855020
+ .long 3162728930
+ .long 3792452178
+ .long 1072994923
+ .long 3420119467
+ .long 1016471430
+ .long 3147791459
+ .long 1073004818
+ .long 1342204979
+ .long 1013937254
+ .long 999189752
+ .long 1073014090
+ .long 1006335472
+ .long 3162850919
+ .long 711011011
+ .long 1073022794
+ .long 4633488
+ .long 3162966895
+ .long 15640363
+ .long 1073030980
+ .long 1686389560
+ .long 3164376226
+ .long 1218463589
+ .long 1073042382
+ .long 1526837110
+ .long 3163533985
+ .long 2538470555
+ .long 1073056144
+ .long 2273304406
+ .long 3163784996
+ .long 1229720947
+ .long 1073068489
+ .long 2971628206
+ .long 3162356540
+ .long 3115427016
+ .long 1073079621
+ .long 4215132957
+ .long 3164282762
+ .long 4030612557
+ .long 1073089709
+ .long 1913251691
+ .long 3163671292
+ .long 2728521257
+ .long 1073098892
+ .long 2861089500
+ .long 1015454459
+ .long 1118696283
+ .long 1073107285
+ .long 1628948053
+ .long 1016179658
+ .long 2682711255
+ .long 1073114984
+ .long 2906306266
+ .long 1014142643
+ .long 2073898081
+ .long 1073122072
+ .long 1322740454
+ .long 3164497217
+ .long 1403700297
+ .long 1073128618
+ .long 416137895
+ .long 3162781466
+ .long 2502685617
+ .long 1073134681
+ .long 3242008732
+ .long 1014593495
+ .long 1531926851
+ .long 1073140313
+ .long 1362708094
+ .long 1016517604
+ .long 3572814411
+ .long 1073145557
+ .long 3709790527
+ .long 1012646874
+ .long 1695536111
+ .long 1073150453
+ .long 3980346340
+ .long 1016705136
+ .long 2363057203
+ .long 1073155033
+ .long 2551194792
+ .long 1012569695
+ .long 2873365682
+ .long 1073159327
+ .long 3181154748
+ .long 1017041450
+ .long 1053384691
+ .long 1073165288
+ .long 3074536879
+ .long 1016965660
+ .long 3270542712
+ .long 1073172451
+ .long 2535319415
+ .long 3163051778
+ .long 1353631484
+ .long 1073178850
+ .long 1173833755
+ .long 1015534537
+ .long 3511218460
+ .long 1073184599
+ .long 1243608109
+ .long 3161592122
+ .long 4121259284
+ .long 1073189793
+ .long 398584912
+ .long 3163829923
+ .long 1193862106
+ .long 1073194509
+ .long 1873745539
+ .long 3163802819
+ .long 3861949790
+ .long 1073198808
+ .long 3841261147
+ .long 1015587248
+ .long 1486904578
+ .long 1073202745
+ .long 1634726776
+ .long 3163847886
+ .long 2879153715
+ .long 1073206362
+ .long 200456242
+ .long 3164138657
+ .long 385353253
+ .long 1073209698
+ .long 1186355517
+ .long 1014887155
+ .long 1125865839
+ .long 1073212783
+ .long 203561262
+ .long 3161244927
+ .long 1221361475
+ .long 1073215645
+ .long 3382476563
+ .long 1014936138
+ .long 2077323573
+ .long 1073218307
+ .long 1005121005
+ .long 3164430752
+ .long 215611373
+ .long 1073220790
+ .long 353198764
+ .long 3164485137
+ .long 2347419265
+ .long 1073223110
+ .long 1103143360
+ .long 1016542137
+ .long 1379112765
+ .long 1073225284
+ .long 381583533
+ .long 3162870833
+ .long 3891198463
+ .long 1073228298
+ .long 1771275754
+ .long 1014654681
+ .long 3395914051
+ .long 1073231917
+ .long 2350900914
+ .long 3164013978
+ .long 2799919478
+ .long 1073235146
+ .long 2893950164
+ .long 3163260901
+ .long 1138673476
+ .long 1073238045
+ .long 2622204785
+ .long 3164174388
+ .long 3408855940
+ .long 1073240661
+ .long 2800881650
+ .long 1016008624
+ .long 2044858738
+ .long 1073243035
+ .long 604544785
+ .long 1017022901
+ .long 2578795176
+ .long 1073245198
+ .long 2557332925
+ .long 1016135165
+ .long 4196285314
+ .long 1073247177
+ .long 2032365307
+ .long 1016194735
+ .long 224877747
+ .long 1073248996
+ .long 497926916
+ .long 1016947111
+ .long 3271386490
+ .long 1073250671
+ .long 2689994846
+ .long 1016631513
+ .long 813635989
+ .long 1073252221
+ .long 747035277
+ .long 3164530136
+ .long 369829519
+ .long 1073253658
+ .long 2182033858
+ .long 3163190340
+ .long 1187679052
+ .long 1073254994
+ .long 673954443
+ .long 1016149821
+ .long 4232586098
+ .long 1073256239
+ .long 497775200
+ .long 3162179015
+ .long 426690558
+ .long 1073257404
+ .long 3063343247
+ .long 1016865578
+ .long 1624065902
+ .long 1073258494
+ .long 1354224996
+ .long 3163503778
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 4294901760
+ .long 0
+ .long 0
+ .long 0
+ .long 32768
+ .long 0
+ .long 0
+ .long 2006262985
+ .long 1069310863
+ .long 2358449471
+ .long 3217342131
+ .long 3845454352
+ .long 1069952297
+ .long 2829679149
+ .long 1073771565
+ .type static_const_table,@object
+ .size static_const_table,2704
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_cbrt.S b/libm/x86/s_cbrt.S
new file mode 100644
index 0000000..0c98c99
--- /dev/null
+++ b/libm/x86/s_cbrt.S
@@ -0,0 +1,738 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Assume x=2^{3*k+j} * 1.b1 b2 ... b5 b6 ... b52, where j = 0,1,2.
+// Let r=(x*2^{-3k-j} - 1.b1 b2 ... b5 1)* rcp[b1 b2 ..b5],
+// where rcp[b1 b2 .. b5]=1/(1.b1 b2 b3 b4 b5 1) in double precision
+// cbrt(2^j * 1. b1 b2 .. b5 1) is approximated as T[j][b1..b5]+D[j][b1..b5]
+// (T stores the high 53 bits, D stores the low order bits)
+// Result=2^k*T+(2^k*T*r)*P+2^k*D
+// where P=p1+p2*r+..+p8*r^7
+//
+// Special cases:
+// cbrt(NaN) = quiet NaN, and raise invalid exception
+// cbrt(INF) = that INF
+// cbrt(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin cbrt
+ENTRY(cbrt)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %esi, 52(%esp)
+ call static_func
+ movl %eax, %esi
+ movsd 128(%esp), %xmm0
+ movapd %xmm0, %xmm7
+ movsd %xmm0, 8(%esp)
+ movl $524032, %edx
+ movsd 64(%esi), %xmm5
+ movsd 80(%esi), %xmm3
+ psrlq $44, %xmm7
+ pextrw $0, %xmm7, %ecx
+ movd %xmm7, %eax
+ movsd 96(%esi), %xmm1
+ movsd 112(%esi), %xmm2
+ movl %ebx, 16(%esp)
+ andl $248, %ecx
+ movsd 128(%ecx,%esi), %xmm4
+ movl %eax, %ebx
+ andl %eax, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_0.0.2
+ cmpl $524032, %edx
+ je .L_2TAG_PACKET_1.0.2
+ shrl $8, %edx
+ shrl $8, %ebx
+ andpd %xmm0, %xmm2
+ andpd %xmm5, %xmm0
+ orpd %xmm2, %xmm3
+ orpd %xmm0, %xmm1
+ movapd (%esi), %xmm5
+ movl $5462, %eax
+ movapd 16(%esi), %xmm6
+ mull %edx
+ movl %ebx, %edx
+ andl $2047, %ebx
+ shrl $14, %eax
+ andl $2048, %edx
+ subl %eax, %ebx
+ subl %eax, %ebx
+ subl %eax, %ebx
+ shll $8, %ebx
+ addl $682, %eax
+ orl %edx, %eax
+ movd %eax, %xmm7
+ addl %ebx, %ecx
+ psllq $52, %xmm7
+.L_2TAG_PACKET_2.0.2:
+ movapd 32(%esi), %xmm2
+ movapd 48(%esi), %xmm0
+ subsd %xmm3, %xmm1
+ movq %xmm7, %xmm3
+ mulsd 384(%ecx,%esi), %xmm7
+ mulsd %xmm4, %xmm1
+ mulsd 1152(%ecx,%esi), %xmm3
+ movapd %xmm1, %xmm4
+ unpcklpd %xmm1, %xmm1
+ mulpd %xmm1, %xmm5
+ mulpd %xmm1, %xmm6
+ mulpd %xmm1, %xmm1
+ addpd %xmm5, %xmm2
+ addpd %xmm6, %xmm0
+ mulpd %xmm1, %xmm2
+ mulpd %xmm1, %xmm1
+ mulsd %xmm7, %xmm4
+ addpd %xmm2, %xmm0
+ movl 16(%esp), %ebx
+ mulsd %xmm0, %xmm1
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ mulsd %xmm4, %xmm0
+ addsd %xmm3, %xmm0
+ addsd %xmm7, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_0.0.2:
+ mulsd 1984(%esi), %xmm0
+ movq %xmm0, %xmm7
+ movl $524032, %edx
+ psrlq $44, %xmm7
+ pextrw $0, %xmm7, %ecx
+ movd %xmm7, %eax
+ andl $248, %ecx
+ movsd 128(%ecx,%esi), %xmm4
+ movl %eax, %ebx
+ andl %eax, %edx
+ shrl $8, %edx
+ shrl $8, %ebx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_4.0.2
+ andpd %xmm0, %xmm2
+ andpd %xmm5, %xmm0
+ orpd %xmm2, %xmm3
+ orpd %xmm0, %xmm1
+ movapd (%esi), %xmm5
+ movl $5462, %eax
+ movapd 16(%esi), %xmm6
+ mull %edx
+ movl %ebx, %edx
+ andl $2047, %ebx
+ shrl $14, %eax
+ andl $2048, %edx
+ subl %eax, %ebx
+ subl %eax, %ebx
+ subl %eax, %ebx
+ shll $8, %ebx
+ addl $661, %eax
+ orl %edx, %eax
+ movd %eax, %xmm7
+ addl %ebx, %ecx
+ psllq $52, %xmm7
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_4.0.2:
+ cmpl $0, %ebx
+ jne .L_2TAG_PACKET_5.0.2
+ movl 16(%esp), %ebx
+ fldl 1952(%esi)
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_5.0.2:
+ movl 16(%esp), %ebx
+ fldl 1968(%esi)
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_1.0.2:
+ movl 16(%esp), %ebx
+ movl 132(%esp), %eax
+ movl 128(%esp), %edx
+ movl %eax, %ecx
+ andl $2147483647, %ecx
+ cmpl $2146435072, %ecx
+ ja .L_2TAG_PACKET_6.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_6.0.2
+ cmpl $2146435072, %eax
+ jne .L_2TAG_PACKET_7.0.2
+ fldl 1920(%esi)
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_7.0.2:
+ fldl 1936(%esi)
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_6.0.2:
+ movsd 8(%esp), %xmm0
+ addsd %xmm0, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+.L_2TAG_PACKET_3.0.2:
+ movl 52(%esp), %esi
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(cbrt)
+# -- End cbrt
+
+# Start file scope ASM
+ALIAS_SYMBOL(cbrtl, cbrt);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 1553778919
+ .long 3213899486
+ .long 3534952507
+ .long 3215266280
+ .long 1646371399
+ .long 3214412045
+ .long 477218588
+ .long 3216798151
+ .long 3582521621
+ .long 1066628362
+ .long 1007461464
+ .long 1068473053
+ .long 889629714
+ .long 1067378449
+ .long 1431655765
+ .long 1070945621
+ .long 4294967295
+ .long 1048575
+ .long 0
+ .long 0
+ .long 0
+ .long 3220193280
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 1032192
+ .long 0
+ .long 0
+ .long 528611360
+ .long 3220144632
+ .long 2884679527
+ .long 3220082993
+ .long 1991868891
+ .long 3220024928
+ .long 2298714891
+ .long 3219970134
+ .long 58835168
+ .long 3219918343
+ .long 3035110223
+ .long 3219869313
+ .long 1617585086
+ .long 3219822831
+ .long 2500867033
+ .long 3219778702
+ .long 4241943008
+ .long 3219736752
+ .long 258732970
+ .long 3219696825
+ .long 404232216
+ .long 3219658776
+ .long 2172167368
+ .long 3219622476
+ .long 1544257904
+ .long 3219587808
+ .long 377579543
+ .long 3219554664
+ .long 1616385542
+ .long 3219522945
+ .long 813783277
+ .long 3219492562
+ .long 3940743189
+ .long 3219463431
+ .long 2689777499
+ .long 3219435478
+ .long 1700977147
+ .long 3219408632
+ .long 3169102082
+ .long 3219382828
+ .long 327235604
+ .long 3219358008
+ .long 1244336319
+ .long 3219334115
+ .long 1300311200
+ .long 3219311099
+ .long 3095471925
+ .long 3219288912
+ .long 2166487928
+ .long 3219267511
+ .long 2913108253
+ .long 3219246854
+ .long 293672978
+ .long 3219226904
+ .long 288737297
+ .long 3219207624
+ .long 1810275472
+ .long 3219188981
+ .long 174592167
+ .long 3219170945
+ .long 3539053052
+ .long 3219153485
+ .long 2164392968
+ .long 3219136576
+ .long 572345495
+ .long 1072698681
+ .long 1998204467
+ .long 1072709382
+ .long 3861501553
+ .long 1072719872
+ .long 2268192434
+ .long 1072730162
+ .long 2981979308
+ .long 1072740260
+ .long 270859143
+ .long 1072750176
+ .long 2958651392
+ .long 1072759916
+ .long 313113243
+ .long 1072769490
+ .long 919449400
+ .long 1072778903
+ .long 2809328903
+ .long 1072788162
+ .long 2222981587
+ .long 1072797274
+ .long 2352530781
+ .long 1072806244
+ .long 594152517
+ .long 1072815078
+ .long 1555767199
+ .long 1072823780
+ .long 4282421314
+ .long 1072832355
+ .long 2355578597
+ .long 1072840809
+ .long 1162590619
+ .long 1072849145
+ .long 797864051
+ .long 1072857367
+ .long 431273680
+ .long 1072865479
+ .long 2669831148
+ .long 1072873484
+ .long 733477752
+ .long 1072881387
+ .long 4280220604
+ .long 1072889189
+ .long 801961634
+ .long 1072896896
+ .long 2915370760
+ .long 1072904508
+ .long 1159613482
+ .long 1072912030
+ .long 2689944798
+ .long 1072919463
+ .long 1248687822
+ .long 1072926811
+ .long 2967951030
+ .long 1072934075
+ .long 630170432
+ .long 1072941259
+ .long 3760898254
+ .long 1072948363
+ .long 0
+ .long 1072955392
+ .long 2370273294
+ .long 1072962345
+ .long 1261754802
+ .long 1072972640
+ .long 546334065
+ .long 1072986123
+ .long 1054893830
+ .long 1072999340
+ .long 1571187597
+ .long 1073012304
+ .long 1107975175
+ .long 1073025027
+ .long 3606909377
+ .long 1073037519
+ .long 1113616747
+ .long 1073049792
+ .long 4154744632
+ .long 1073061853
+ .long 3358931423
+ .long 1073073713
+ .long 4060702372
+ .long 1073085379
+ .long 747576176
+ .long 1073096860
+ .long 3023138255
+ .long 1073108161
+ .long 1419988548
+ .long 1073119291
+ .long 1914185305
+ .long 1073130255
+ .long 294389948
+ .long 1073141060
+ .long 3761802570
+ .long 1073151710
+ .long 978281566
+ .long 1073162213
+ .long 823148820
+ .long 1073172572
+ .long 2420954441
+ .long 1073182792
+ .long 3815449908
+ .long 1073192878
+ .long 2046058587
+ .long 1073202835
+ .long 1807524753
+ .long 1073212666
+ .long 2628681401
+ .long 1073222375
+ .long 3225667357
+ .long 1073231966
+ .long 1555307421
+ .long 1073241443
+ .long 3454043099
+ .long 1073250808
+ .long 1208137896
+ .long 1073260066
+ .long 3659916772
+ .long 1073269218
+ .long 1886261264
+ .long 1073278269
+ .long 3593647839
+ .long 1073287220
+ .long 3086012205
+ .long 1073296075
+ .long 2769796922
+ .long 1073304836
+ .long 888716057
+ .long 1073317807
+ .long 2201465623
+ .long 1073334794
+ .long 164369365
+ .long 1073351447
+ .long 3462666733
+ .long 1073367780
+ .long 2773905457
+ .long 1073383810
+ .long 1342879088
+ .long 1073399550
+ .long 2543933975
+ .long 1073415012
+ .long 1684477781
+ .long 1073430209
+ .long 3532178543
+ .long 1073445151
+ .long 1147747300
+ .long 1073459850
+ .long 1928031793
+ .long 1073474314
+ .long 2079717015
+ .long 1073488553
+ .long 4016765315
+ .long 1073502575
+ .long 3670431139
+ .long 1073516389
+ .long 3549227225
+ .long 1073530002
+ .long 11637607
+ .long 1073543422
+ .long 588220169
+ .long 1073556654
+ .long 2635407503
+ .long 1073569705
+ .long 2042029317
+ .long 1073582582
+ .long 1925128962
+ .long 1073595290
+ .long 4136375664
+ .long 1073607834
+ .long 759964600
+ .long 1073620221
+ .long 4257606771
+ .long 1073632453
+ .long 297278907
+ .long 1073644538
+ .long 3655053093
+ .long 1073656477
+ .long 2442253172
+ .long 1073668277
+ .long 1111876799
+ .long 1073679941
+ .long 3330973139
+ .long 1073691472
+ .long 3438879452
+ .long 1073702875
+ .long 3671565478
+ .long 1073714153
+ .long 1317849547
+ .long 1073725310
+ .long 1642364115
+ .long 1073736348
+ .long 4050900474
+ .long 1014427190
+ .long 1157977860
+ .long 1016444461
+ .long 1374568199
+ .long 1017271387
+ .long 2809163288
+ .long 1016882676
+ .long 3742377377
+ .long 1013168191
+ .long 3101606597
+ .long 1017541672
+ .long 65224358
+ .long 1017217597
+ .long 2691591250
+ .long 1017266643
+ .long 4020758549
+ .long 1017689313
+ .long 1316310992
+ .long 1018030788
+ .long 1031537856
+ .long 1014090882
+ .long 3261395239
+ .long 1016413641
+ .long 886424999
+ .long 1016313335
+ .long 3114776834
+ .long 1014195875
+ .long 1681120620
+ .long 1017825416
+ .long 1329600273
+ .long 1016625740
+ .long 465474623
+ .long 1017097119
+ .long 4251633980
+ .long 1017169077
+ .long 1986990133
+ .long 1017710645
+ .long 752958613
+ .long 1017159641
+ .long 2216216792
+ .long 1018020163
+ .long 4282860129
+ .long 1015924861
+ .long 1557627859
+ .long 1016039538
+ .long 3889219754
+ .long 1018086237
+ .long 3684996408
+ .long 1017353275
+ .long 723532103
+ .long 1017717141
+ .long 2951149676
+ .long 1012528470
+ .long 831890937
+ .long 1017830553
+ .long 1031212645
+ .long 1017387331
+ .long 2741737450
+ .long 1017604974
+ .long 2863311531
+ .long 1003776682
+ .long 4276736099
+ .long 1013153088
+ .long 4111778382
+ .long 1015673686
+ .long 1728065769
+ .long 1016413986
+ .long 2708718031
+ .long 1018078833
+ .long 1069335005
+ .long 1015291224
+ .long 700037144
+ .long 1016482032
+ .long 2904566452
+ .long 1017226861
+ .long 4074156649
+ .long 1017622651
+ .long 25019565
+ .long 1015245366
+ .long 3601952608
+ .long 1015771755
+ .long 3267129373
+ .long 1017904664
+ .long 503203103
+ .long 1014921629
+ .long 2122011730
+ .long 1018027866
+ .long 3927295461
+ .long 1014189456
+ .long 2790625147
+ .long 1016024251
+ .long 1330460186
+ .long 1016940346
+ .long 4033568463
+ .long 1015538390
+ .long 3695818227
+ .long 1017509621
+ .long 257573361
+ .long 1017208868
+ .long 3227697852
+ .long 1017337964
+ .long 234118548
+ .long 1017169577
+ .long 4009025803
+ .long 1017278524
+ .long 1948343394
+ .long 1017749310
+ .long 678398162
+ .long 1018144239
+ .long 3083864863
+ .long 1016669086
+ .long 2415453452
+ .long 1017890370
+ .long 175467344
+ .long 1017330033
+ .long 3197359580
+ .long 1010339928
+ .long 2071276951
+ .long 1015941358
+ .long 268372543
+ .long 1016737773
+ .long 938132959
+ .long 1017389108
+ .long 1816750559
+ .long 1017337448
+ .long 4119203749
+ .long 1017152174
+ .long 2578653878
+ .long 1013108497
+ .long 2470331096
+ .long 1014678606
+ .long 123855735
+ .long 1016553320
+ .long 1265650889
+ .long 1014782687
+ .long 3414398172
+ .long 1017182638
+ .long 1040773369
+ .long 1016158401
+ .long 3483628886
+ .long 1016886550
+ .long 4140499405
+ .long 1016191425
+ .long 3893477850
+ .long 1016964495
+ .long 3935319771
+ .long 1009634717
+ .long 2978982660
+ .long 1015027112
+ .long 2452709923
+ .long 1017990229
+ .long 3190365712
+ .long 1015835149
+ .long 4237588139
+ .long 1015832925
+ .long 2610678389
+ .long 1017962711
+ .long 2127316774
+ .long 1017405770
+ .long 824267502
+ .long 1017959463
+ .long 2165924042
+ .long 1017912225
+ .long 2774007076
+ .long 1013257418
+ .long 4123916326
+ .long 1017582284
+ .long 1976417958
+ .long 1016959909
+ .long 4092806412
+ .long 1017711279
+ .long 119251817
+ .long 1015363631
+ .long 3475418768
+ .long 1017675415
+ .long 1972580503
+ .long 1015470684
+ .long 815541017
+ .long 1017517969
+ .long 2429917451
+ .long 1017397776
+ .long 4062888482
+ .long 1016749897
+ .long 68284153
+ .long 1017925678
+ .long 2207779246
+ .long 1016320298
+ .long 1183466520
+ .long 1017408657
+ .long 143326427
+ .long 1017060403
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 0
+ .long 0
+ .long 4293918720
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 1138753536
+ .long 0
+ .long 0
+ .type static_const_table,@object
+ .size static_const_table,2000
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_cos.S b/libm/x86/s_cos.S
new file mode 100644
index 0000000..fd5ef5d
--- /dev/null
+++ b/libm/x86/s_cos.S
@@ -0,0 +1,892 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// 1. RANGE REDUCTION
+//
+// We perform an initial range reduction from X to r with
+//
+// X =~= N * pi/32 + r
+//
+// so that |r| <= pi/64 + epsilon. We restrict inputs to those
+// where |N| <= 932560. Beyond this, the range reduction is
+// insufficiently accurate. For extremely small inputs,
+// denormalization can occur internally, impacting performance.
+// This means that the main path is actually only taken for
+// 2^-252 <= |X| < 90112.
+//
+// To avoid branches, we perform the range reduction to full
+// accuracy each time.
+//
+// X - N * (P_1 + P_2 + P_3)
+//
+// where P_1 and P_2 are 32-bit numbers (so multiplication by N
+// is exact) and P_3 is a 53-bit number. Together, these
+// approximate pi well enough for all cases in the restricted
+// range.
+//
+// The main reduction sequence is:
+//
+// y = 32/pi * x
+// N = integer(y)
+// (computed by adding and subtracting off SHIFTER)
+//
+// m_1 = N * P_1
+// m_2 = N * P_2
+// r_1 = x - m_1
+// r = r_1 - m_2
+// (this r can be used for most of the calculation)
+//
+// c_1 = r_1 - r
+// m_3 = N * P_3
+// c_2 = c_1 - m_2
+// c = c_2 - m_3
+//
+// 2. MAIN ALGORITHM
+//
+// The algorithm uses a table lookup based on B = M * pi / 32
+// where M = N mod 64. The stored values are:
+// sigma closest power of 2 to cos(B)
+// C_hl 53-bit cos(B) - sigma
+// S_hi + S_lo 2 * 53-bit sin(B)
+//
+// The computation is organized as follows:
+//
+// sin(B + r + c) = [sin(B) + sigma * r] +
+// r * (cos(B) - sigma) +
+// sin(B) * [cos(r + c) - 1] +
+// cos(B) * [sin(r + c) - r]
+//
+// which is approximately:
+//
+// [S_hi + sigma * r] +
+// C_hl * r +
+// S_lo + S_hi * [(cos(r) - 1) - r * c] +
+// (C_hl + sigma) * [(sin(r) - r) + c]
+//
+// and this is what is actually computed. We separate this sum
+// into four parts:
+//
+// hi + med + pols + corr
+//
+// where
+//
+// hi = S_hi + sigma r
+// med = C_hl * r
+// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+// corr = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+// 3. POLYNOMIAL
+//
+// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+// (sin(r) - r) can be rearranged freely, since it is quite
+// small, so we exploit parallelism to the fullest.
+//
+// psc4 = SC_4 * r_1
+// msc4 = psc4 * r
+// r2 = r * r
+// msc2 = SC_2 * r2
+// r4 = r2 * r2
+// psc3 = SC_3 + msc4
+// psc1 = SC_1 + msc2
+// msc3 = r4 * psc3
+// sincospols = psc1 + msc3
+// pols = sincospols *
+// <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+// 4. CORRECTION TERM
+//
+// This is where the "c" component of the range reduction is
+// taken into account; recall that just "r" is used for most of
+// the calculation.
+//
+// -c = m_3 - c_2
+// -d = S_hi * r - (C_hl + sigma)
+// corr = -c * -d + S_lo
+//
+// 5. COMPENSATED SUMMATIONS
+//
+// The two successive compensated summations add up the high
+// and medium parts, leaving just the low parts to add up at
+// the end.
+//
+// rs = sigma * r
+// res_int = S_hi + rs
+// k_0 = S_hi - res_int
+// k_2 = k_0 + rs
+// med = C_hl * r
+// res_hi = res_int + med
+// k_1 = res_int - res_hi
+// k_3 = k_1 + med
+//
+// 6. FINAL SUMMATION
+//
+// We now add up all the small parts:
+//
+// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+// Now the overall result is just:
+//
+// res_hi + res_lo
+//
+// 7. SMALL ARGUMENTS
+//
+// Inputs with |X| < 2^-252 are treated specially as
+// 1 - |x|.
+//
+// Special cases:
+// cos(NaN) = quiet NaN, and raise invalid exception
+// cos(INF) = NaN and raise invalid exception
+// cos(0) = 1
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin cos
+ENTRY(cos)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 56(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ subl $12336, %eax
+ cmpl $4293, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ movsd 2160(%ebx), %xmm1
+ mulsd %xmm0, %xmm1
+ movapd 2240(%ebx), %xmm5
+ movsd 2224(%ebx), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ movsd 2128(%ebx), %xmm3
+ movapd 2112(%ebx), %xmm2
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %edx
+ cvtsi2sdl %edx, %xmm1
+ mulsd %xmm1, %xmm3
+ unpcklpd %xmm1, %xmm1
+ addl $1865232, %edx
+ movapd %xmm0, %xmm4
+ andl $63, %edx
+ movapd 2096(%ebx), %xmm5
+ lea (%ebx), %eax
+ shll $5, %edx
+ addl %edx, %eax
+ mulpd %xmm1, %xmm2
+ subsd %xmm3, %xmm0
+ mulsd 2144(%ebx), %xmm1
+ subsd %xmm3, %xmm4
+ movsd 8(%eax), %xmm7
+ unpcklpd %xmm0, %xmm0
+ movapd %xmm4, %xmm3
+ subsd %xmm2, %xmm4
+ mulpd %xmm0, %xmm5
+ subpd %xmm2, %xmm0
+ movapd 2064(%ebx), %xmm6
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm2, %xmm3
+ movapd (%eax), %xmm2
+ subsd %xmm3, %xmm1
+ movsd 24(%eax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd 2080(%ebx), %xmm5
+ mulsd (%eax), %xmm4
+ addpd 2048(%ebx), %xmm6
+ mulpd %xmm0, %xmm5
+ movapd %xmm3, %xmm0
+ addsd 8(%eax), %xmm3
+ mulpd %xmm7, %xmm1
+ movapd %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movsd 8(%eax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%eax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm0, %xmm5
+ addsd %xmm7, %xmm3
+ addsd %xmm5, %xmm1
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ unpckhpd %xmm6, %xmm6
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm4
+ movsd %xmm4, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ jg .L_2TAG_PACKET_2.0.2
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ pinsrw $3, %eax, %xmm0
+ movsd 2192(%ebx), %xmm1
+ subsd %xmm0, %xmm1
+ movsd %xmm1, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movl 132(%esp), %eax
+ andl $2146435072, %eax
+ cmpl $2146435072, %eax
+ je .L_2TAG_PACKET_3.0.2
+ subl $32, %esp
+ movsd %xmm0, (%esp)
+ lea 40(%esp), %eax
+ movl %eax, 8(%esp)
+ movl $1, %eax
+ movl %eax, 12(%esp)
+ call __libm_sincos_huge
+ addl $32, %esp
+ fldl 8(%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_3.0.2:
+ fldl 128(%esp)
+ fmull 2208(%ebx)
+.L_2TAG_PACKET_1.0.2:
+ movl 56(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(cos)
+# -- End cos
+
+# Start file scope ASM
+ALIAS_SYMBOL(cosl, cos);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 1072693248
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 1072693248
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 1071644672
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 1071644672
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 1070596096
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 1070596096
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 1069547520
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 3217031168
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 3218079744
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 3218079744
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 3219128320
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 3219128320
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 3220176896
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 3220176896
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 3219128320
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 3219128320
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 3218079744
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 3218079744
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 3217031168
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 1069547520
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 1070596096
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 1070596096
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 1071644672
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 1071644672
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 1072693248
+ .long 1431655765
+ .long 3217380693
+ .long 0
+ .long 3219128320
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1067799893
+ .long 436314138
+ .long 3207201184
+ .long 381774871
+ .long 3210133868
+ .long 2773927732
+ .long 1053236707
+ .long 436314138
+ .long 1056571808
+ .long 442499072
+ .long 1032893537
+ .long 442499072
+ .long 1032893537
+ .long 1413480448
+ .long 1069097467
+ .long 0
+ .long 0
+ .long 771977331
+ .long 996350346
+ .long 0
+ .long 0
+ .long 1841940611
+ .long 1076125488
+ .long 0
+ .long 0
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .type static_const_table,@object
+ .size static_const_table,2256
+ .data
+ .hidden __libm_sincos_huge
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_expm1.S b/libm/x86/s_expm1.S
new file mode 100644
index 0000000..1f9e87b
--- /dev/null
+++ b/libm/x86/s_expm1.S
@@ -0,0 +1,702 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Description:
+// Let K = 64 (table size).
+//
+// Four sub-domains:
+// 1. |x| < 1/(2*K)
+// expm1(x) ~ P(x)
+// 2. 1/(2*K) <= |x| <= 56*log(2)
+// x x/log(2) n
+// e - 1 = 2 = 2 * T[j] * (1 + P(y)) - 1
+// 3. 56*log(2) < x < MAX_LOG
+// x x x/log(2) n
+// e - 1 ~ e = 2 = 2 * T[j] * (1 + P(y))
+// 4. x < -56*log(2)
+// x x
+// e - 1 = -1 + e ~ -1
+// where
+// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K]
+// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2]
+// j/K
+// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
+//
+// P(y) is a minimax polynomial approximation of exp(x)-1
+// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
+//
+// In case 3, to avoid problems with arithmetic overflow and underflow,
+// n n1 n2
+// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
+// and BIAS is a value of exponent bias.
+//
+// Special cases:
+// expm1(NaN) is NaN
+// expm1(+INF) is +INF
+// expm1(-INF) is -1
+// expm1(x) is x for subnormals
+// for finite argument, only expm1(0)=0 is exact.
+// For IEEE double
+// if x > 709.782712893383973096 then expm1(x) overflow
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin expm1
+ENTRY(expm1)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 64(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ unpcklpd %xmm0, %xmm0
+ movapd 64(%ebx), %xmm1
+ movapd 48(%ebx), %xmm6
+ movapd 80(%ebx), %xmm2
+ movapd 96(%ebx), %xmm3
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ movl $16527, %edx
+ subl %eax, %edx
+ subl $16304, %eax
+ orl %eax, %edx
+ cmpl $-2147483648, %edx
+ jae .L_2TAG_PACKET_0.0.2
+ mulpd %xmm0, %xmm1
+ addpd %xmm6, %xmm1
+ movapd %xmm1, %xmm7
+ subpd %xmm6, %xmm1
+ mulpd %xmm1, %xmm2
+ movapd 112(%ebx), %xmm4
+ mulpd %xmm1, %xmm3
+ movapd 128(%ebx), %xmm5
+ subpd %xmm2, %xmm0
+ movd %xmm7, %eax
+ movl %eax, %ecx
+ andl $63, %ecx
+ shll $4, %ecx
+ sarl $6, %eax
+ movl %eax, %edx
+ subpd %xmm3, %xmm0
+ movapd 160(%ebx,%ecx), %xmm2
+ movsd 144(%ebx), %xmm3
+ mulpd %xmm0, %xmm4
+ movapd %xmm0, %xmm1
+ mulpd %xmm0, %xmm0
+ mulsd %xmm0, %xmm3
+ addpd %xmm4, %xmm5
+ mulsd %xmm0, %xmm0
+ movapd %xmm2, %xmm4
+ unpckhpd %xmm2, %xmm2
+ movdqa 16(%ebx), %xmm6
+ pand %xmm6, %xmm7
+ movdqa 32(%ebx), %xmm6
+ paddq %xmm6, %xmm7
+ psllq $46, %xmm7
+ mulsd %xmm0, %xmm3
+ mulpd %xmm5, %xmm0
+ addl $894, %edx
+ cmpl $1916, %edx
+ ja .L_2TAG_PACKET_1.0.2
+ addsd %xmm3, %xmm0
+ xorpd %xmm3, %xmm3
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm3
+ orpd %xmm7, %xmm2
+ mulsd %xmm4, %xmm7
+ movapd %xmm3, %xmm6
+ addsd %xmm1, %xmm3
+ pextrw $3, %xmm2, %edx
+ pshufd $238, %xmm0, %xmm5
+ psrlq $38, %xmm3
+ psllq $38, %xmm3
+ movapd %xmm2, %xmm4
+ subsd %xmm3, %xmm6
+ addsd %xmm5, %xmm0
+ addsd %xmm6, %xmm1
+ addsd %xmm7, %xmm4
+ mulsd %xmm3, %xmm7
+ mulsd %xmm2, %xmm3
+ xorpd %xmm5, %xmm5
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm5
+ addsd %xmm1, %xmm0
+ movl $17184, %ecx
+ subl %edx, %ecx
+ subl $16256, %edx
+ orl %edx, %ecx
+ jl .L_2TAG_PACKET_2.0.2
+ mulsd %xmm4, %xmm0
+ subsd %xmm5, %xmm3
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+.L_2TAG_PACKET_3.0.2:
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_2.0.2:
+ cmpl $0, %edx
+ jl .L_2TAG_PACKET_5.0.2
+ mulsd %xmm4, %xmm0
+ subsd %xmm5, %xmm7
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_5.0.2:
+ mulsd %xmm4, %xmm0
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ subsd %xmm5, %xmm0
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_1.0.2:
+ movl 132(%esp), %ecx
+ addsd %xmm0, %xmm1
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ cmpl $0, %ecx
+ jl .L_2TAG_PACKET_6.0.2
+ fstcw 24(%esp)
+ movzwl 24(%esp), %edx
+ orl $768, %edx
+ movw %dx, 28(%esp)
+ fldcw 28(%esp)
+ movl %eax, %edx
+ sarl $1, %eax
+ subl %eax, %edx
+ movdqa (%ebx), %xmm6
+ pandn %xmm2, %xmm6
+ addl $1023, %eax
+ movd %eax, %xmm3
+ psllq $52, %xmm3
+ orpd %xmm3, %xmm6
+ mulsd %xmm3, %xmm4
+ movsd %xmm0, 8(%esp)
+ fldl 8(%esp)
+ movsd %xmm6, 16(%esp)
+ fldl 16(%esp)
+ movsd %xmm4, 16(%esp)
+ fldl 16(%esp)
+ addl $1023, %edx
+ movd %edx, %xmm4
+ psllq $52, %xmm4
+ faddp %st, %st(1)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ movsd %xmm4, 8(%esp)
+ fldl 8(%esp)
+ fmulp %st, %st(1)
+ fstpl 8(%esp)
+ movsd 8(%esp), %xmm0
+ fldcw 24(%esp)
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_7.0.2
+ jmp .L_2TAG_PACKET_4.0.2
+ cmpl $-2147483648, %ecx
+ jb .L_2TAG_PACKET_7.0.2
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_7.0.2:
+ movl $41, %edx
+.L_2TAG_PACKET_8.0.2:
+ movsd %xmm0, (%esp)
+ movsd 128(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_10.0.2:
+ cmpl $2146435072, %eax
+ jae .L_2TAG_PACKET_11.0.2
+ movsd 1272(%ebx), %xmm0
+ mulsd %xmm0, %xmm0
+ movl $41, %edx
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_11.0.2:
+ movl 132(%esp), %eax
+ movl 128(%esp), %edx
+ movl %eax, %ecx
+ andl $2147483647, %eax
+ cmpl $2146435072, %eax
+ ja .L_2TAG_PACKET_12.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_12.0.2
+ cmpl $0, %ecx
+ jl .L_2TAG_PACKET_13.0.2
+ movsd 1256(%ebx), %xmm0
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_13.0.2:
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_12.0.2:
+ movsd 128(%esp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_14.0.2:
+ addl $16304, %eax
+ cmpl $15504, %eax
+ jb .L_2TAG_PACKET_15.0.2
+ movapd 1184(%ebx), %xmm2
+ pshufd $68, %xmm0, %xmm1
+ movapd 1200(%ebx), %xmm3
+ movapd 1216(%ebx), %xmm4
+ movsd 1232(%ebx), %xmm5
+ mulsd %xmm1, %xmm1
+ xorpd %xmm6, %xmm6
+ movl $16352, %eax
+ pinsrw $3, %eax, %xmm6
+ mulpd %xmm0, %xmm2
+ xorpd %xmm7, %xmm7
+ movl $16368, %edx
+ pinsrw $3, %edx, %xmm7
+ addpd %xmm3, %xmm2
+ mulsd %xmm1, %xmm5
+ pshufd $228, %xmm1, %xmm3
+ mulpd %xmm1, %xmm1
+ mulsd %xmm0, %xmm6
+ mulpd %xmm0, %xmm2
+ addpd %xmm4, %xmm2
+ movapd %xmm7, %xmm4
+ addsd %xmm6, %xmm7
+ mulpd %xmm3, %xmm1
+ psrlq $27, %xmm7
+ psllq $27, %xmm7
+ movsd 1288(%ebx), %xmm3
+ subsd %xmm7, %xmm4
+ mulpd %xmm1, %xmm2
+ addsd %xmm4, %xmm6
+ pshufd $238, %xmm2, %xmm1
+ addsd %xmm2, %xmm6
+ andpd %xmm0, %xmm3
+ movapd %xmm0, %xmm4
+ addsd %xmm6, %xmm1
+ subsd %xmm3, %xmm0
+ addsd %xmm5, %xmm1
+ mulsd %xmm7, %xmm3
+ mulsd %xmm7, %xmm0
+ mulsd %xmm1, %xmm4
+ addsd %xmm4, %xmm0
+ addsd %xmm3, %xmm0
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_15.0.2:
+ cmpl $16, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ movapd %xmm0, %xmm2
+ movd %xmm0, %eax
+ psrlq $31, %xmm2
+ movd %xmm2, %ecx
+ orl %ecx, %eax
+ je .L_2TAG_PACKET_3.0.2
+ movl $16, %edx
+ xorpd %xmm1, %xmm1
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm1
+ movl $42, %edx
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_0.0.2:
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_14.0.2
+ movl 132(%esp), %eax
+ cmpl $1083179008, %eax
+ jge .L_2TAG_PACKET_10.0.2
+ cmpl $-1048576, %eax
+ jae .L_2TAG_PACKET_11.0.2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_4.0.2:
+ movsd %xmm0, 48(%esp)
+ fldl 48(%esp)
+.L_2TAG_PACKET_9.0.2:
+ movl 64(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(expm1)
+# -- End expm1
+
+# Start file scope ASM
+ALIAS_SYMBOL(expm1l, expm1);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 4293918720
+ .long 0
+ .long 4293918720
+ .long 4294967232
+ .long 0
+ .long 4294967232
+ .long 0
+ .long 65472
+ .long 0
+ .long 65472
+ .long 0
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 1127743488
+ .long 1697350398
+ .long 1079448903
+ .long 1697350398
+ .long 1079448903
+ .long 4277796864
+ .long 1065758274
+ .long 4277796864
+ .long 1065758274
+ .long 3164486458
+ .long 1025308570
+ .long 3164486458
+ .long 1025308570
+ .long 1963358694
+ .long 1065423121
+ .long 1431655765
+ .long 1069897045
+ .long 1431655765
+ .long 1067799893
+ .long 0
+ .long 1071644672
+ .long 381774871
+ .long 1062650220
+ .long 381774871
+ .long 1062650220
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1000070955
+ .long 1042145304
+ .long 1040187392
+ .long 11418
+ .long 988267849
+ .long 1039500660
+ .long 3539992576
+ .long 22960
+ .long 36755401
+ .long 1042114290
+ .long 402653184
+ .long 34629
+ .long 3634769483
+ .long 1042178627
+ .long 1820327936
+ .long 46424
+ .long 2155991225
+ .long 1041560680
+ .long 847249408
+ .long 58348
+ .long 2766913307
+ .long 1039293264
+ .long 3489660928
+ .long 70401
+ .long 3651174602
+ .long 1040488175
+ .long 2927624192
+ .long 82586
+ .long 3073892131
+ .long 1042240606
+ .long 1006632960
+ .long 94904
+ .long 1328391742
+ .long 1042019037
+ .long 3942645760
+ .long 107355
+ .long 2650893825
+ .long 1041903210
+ .long 822083584
+ .long 119943
+ .long 2397289153
+ .long 1041802037
+ .long 2281701376
+ .long 132667
+ .long 430997175
+ .long 1042110606
+ .long 1845493760
+ .long 145530
+ .long 1230936525
+ .long 1041801015
+ .long 1702887424
+ .long 158533
+ .long 740675935
+ .long 1040178913
+ .long 4110417920
+ .long 171677
+ .long 3489810261
+ .long 1041825986
+ .long 2793406464
+ .long 184965
+ .long 2532600530
+ .long 1040767882
+ .long 167772160
+ .long 198398
+ .long 3542557060
+ .long 1041827263
+ .long 2986344448
+ .long 211976
+ .long 1401563777
+ .long 1041061093
+ .long 922746880
+ .long 225703
+ .long 3129406026
+ .long 1041852413
+ .long 880803840
+ .long 239579
+ .long 900993572
+ .long 1039283234
+ .long 1275068416
+ .long 253606
+ .long 2115029358
+ .long 1042140042
+ .long 562036736
+ .long 267786
+ .long 1086643152
+ .long 1041785419
+ .long 1610612736
+ .long 282120
+ .long 82864366
+ .long 1041256244
+ .long 3045064704
+ .long 296610
+ .long 2392968152
+ .long 1040913683
+ .long 3573547008
+ .long 311258
+ .long 2905856183
+ .long 1040002214
+ .long 1988100096
+ .long 326066
+ .long 3742008261
+ .long 1040011137
+ .long 1451229184
+ .long 341035
+ .long 863393794
+ .long 1040880621
+ .long 914358272
+ .long 356167
+ .long 1446136837
+ .long 1041372426
+ .long 3707764736
+ .long 371463
+ .long 927855201
+ .long 1040617636
+ .long 360710144
+ .long 386927
+ .long 1492679939
+ .long 1041050306
+ .long 2952790016
+ .long 402558
+ .long 608827001
+ .long 1041582217
+ .long 2181038080
+ .long 418360
+ .long 606260204
+ .long 1042271987
+ .long 1711276032
+ .long 434334
+ .long 3163044019
+ .long 1041843851
+ .long 1006632960
+ .long 450482
+ .long 4148747325
+ .long 1041962972
+ .long 3900702720
+ .long 466805
+ .long 802924201
+ .long 1041275378
+ .long 1442840576
+ .long 483307
+ .long 3052749833
+ .long 1041940577
+ .long 1937768448
+ .long 499988
+ .long 2216116399
+ .long 1041486744
+ .long 914358272
+ .long 516851
+ .long 2729697836
+ .long 1041445764
+ .long 2566914048
+ .long 533897
+ .long 540608356
+ .long 1041310907
+ .long 2600468480
+ .long 551129
+ .long 2916344493
+ .long 1040535661
+ .long 1107296256
+ .long 568549
+ .long 731391814
+ .long 1039497014
+ .long 2566914048
+ .long 586158
+ .long 1024722704
+ .long 1041461625
+ .long 2961178624
+ .long 603959
+ .long 3806831748
+ .long 1041732499
+ .long 2675965952
+ .long 621954
+ .long 238953304
+ .long 1040316488
+ .long 2189426688
+ .long 640145
+ .long 749123235
+ .long 1041725785
+ .long 2063597568
+ .long 658534
+ .long 1168187977
+ .long 1041175214
+ .long 2986344448
+ .long 677123
+ .long 3506096399
+ .long 1042186095
+ .long 1426063360
+ .long 695915
+ .long 1470221620
+ .long 1041675499
+ .long 2566914048
+ .long 714911
+ .long 3182425146
+ .long 1041483134
+ .long 3087007744
+ .long 734114
+ .long 3131698208
+ .long 1042208657
+ .long 4068474880
+ .long 753526
+ .long 2300504125
+ .long 1041428596
+ .long 2415919104
+ .long 773150
+ .long 2290297931
+ .long 1037388400
+ .long 3716153344
+ .long 792987
+ .long 3532148223
+ .long 1041626194
+ .long 771751936
+ .long 813041
+ .long 1161884404
+ .long 1042015258
+ .long 3699376128
+ .long 833312
+ .long 876383176
+ .long 1037968878
+ .long 1241513984
+ .long 853805
+ .long 3379986796
+ .long 1042213153
+ .long 3699376128
+ .long 874520
+ .long 1545797737
+ .long 1041681569
+ .long 58720256
+ .long 895462
+ .long 2925146801
+ .long 1042212567
+ .long 855638016
+ .long 916631
+ .long 1316627971
+ .long 1038516204
+ .long 3883925504
+ .long 938030
+ .long 3267869137
+ .long 1040337004
+ .long 2726297600
+ .long 959663
+ .long 3720868999
+ .long 1041782409
+ .long 3992977408
+ .long 981531
+ .long 433316142
+ .long 1041994064
+ .long 1526726656
+ .long 1003638
+ .long 781232103
+ .long 1040093400
+ .long 2172649472
+ .long 1025985
+ .long 2773927732
+ .long 1053236707
+ .long 381774871
+ .long 1062650220
+ .long 379653899
+ .long 1056571845
+ .long 286331153
+ .long 1065423121
+ .long 436314138
+ .long 1059717536
+ .long 1431655765
+ .long 1067799893
+ .long 1431655765
+ .long 1069897045
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 2146435071
+ .long 0
+ .long 1048576
+ .long 4227858432
+ .long 4294967295
+ .type static_const_table,@object
+ .size static_const_table,1296
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_log1p.S b/libm/x86/s_log1p.S
new file mode 100644
index 0000000..7a6d845
--- /dev/null
+++ b/libm/x86/s_log1p.S
@@ -0,0 +1,827 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpps instruction (B0)
+// B = int((B0*2^7+0.5))/2^7
+//
+// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
+//
+// Result: k*log(2) - log(B) + p(r)
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log1p(NaN) = quiet NaN, and raise invalid exception
+// log1p(+INF) = that INF
+// log1p(x) = NaN if x < -1 or x = -INF, and raises invalid exception
+// log1p(-1) = -INF, and raises divide-by-zero exception
+// log1p(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin log1p
+ENTRY(log1p)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ xorpd %xmm3, %xmm3
+ movl $32768, %ecx
+ movd %ecx, %xmm4
+ movsd 2128(%ebx), %xmm5
+ pshufd $68, %xmm0, %xmm7
+ movapd %xmm2, %xmm6
+ pextrw $3, %xmm0, %ecx
+ addsd %xmm2, %xmm0
+ movapd %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ subsd %xmm0, %xmm6
+ orpd %xmm2, %xmm0
+ psllq $5, %xmm0
+ psrlq $34, %xmm0
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ addsd %xmm6, %xmm7
+ rcpss %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ andl $32752, %ecx
+ cmpl $16256, %ecx
+ jb .L_2TAG_PACKET_1.0.2
+ andl $32752, %eax
+ movl $32720, %ecx
+ subl %eax, %ecx
+ pinsrw $3, %ecx, %xmm3
+.L_2TAG_PACKET_2.0.2:
+ mulsd %xmm3, %xmm7
+ paddd %xmm4, %xmm0
+ xorpd %xmm4, %xmm4
+ movl $14336, %ecx
+ pinsrw $3, %ecx, %xmm4
+ orpd %xmm2, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm1, %xmm5
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm1
+ paddd %xmm4, %xmm0
+ mulsd %xmm0, %xmm5
+ movl $16352, %ecx
+ subl %ecx, %eax
+ cvtsi2sdl %eax, %xmm4
+ mulsd %xmm0, %xmm7
+ mulsd %xmm0, %xmm1
+ movsd 2064(%ebx), %xmm6
+ movapd 2080(%ebx), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd (%ebx,%edx), %xmm0
+ movapd 2096(%ebx), %xmm2
+ addsd %xmm5, %xmm1
+ movapd %xmm1, %xmm5
+ addsd %xmm7, %xmm1
+ subsd %xmm1, %xmm5
+ addsd %xmm5, %xmm7
+ mulsd %xmm4, %xmm6
+ mulsd 2072(%ebx), %xmm4
+ mulsd %xmm1, %xmm3
+ pshufd $68, %xmm1, %xmm5
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm2
+ mulpd %xmm5, %xmm5
+ pshufd $228, %xmm0, %xmm6
+ addsd %xmm1, %xmm0
+ addpd 2112(%ebx), %xmm2
+ mulpd %xmm5, %xmm3
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm2
+ addsd %xmm7, %xmm4
+ mulsd %xmm1, %xmm7
+ addsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm6
+ mulsd %xmm5, %xmm5
+ addsd %xmm6, %xmm4
+ subsd %xmm7, %xmm1
+ addpd %xmm3, %xmm2
+ addsd %xmm4, %xmm1
+ mulpd %xmm5, %xmm2
+ addsd %xmm2, %xmm1
+ pshufd $238, %xmm2, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_0.0.2:
+ movsd 112(%esp), %xmm0
+ movapd %xmm0, %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_4.0.2
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_6.0.2:
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_7.0.2:
+ ja .L_2TAG_PACKET_6.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_6.0.2
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_4.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_7.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_8.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ movl $141, %edx
+ mulsd %xmm1, %xmm0
+.L_2TAG_PACKET_9.0.2:
+ movsd %xmm0, (%esp)
+ movsd 112(%esp), %xmm0
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_10.0.2
+.L_2TAG_PACKET_5.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $140, %edx
+ jmp .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_1.0.2:
+ movsd 112(%esp), %xmm0
+ cmpl $15504, %ecx
+ jb .L_2TAG_PACKET_11.0.2
+ movapd 2144(%ebx), %xmm1
+ pshufd $68, %xmm0, %xmm0
+ movapd 2160(%ebx), %xmm2
+ pshufd $68, %xmm0, %xmm4
+ movapd 2176(%ebx), %xmm3
+ mulpd %xmm0, %xmm1
+ xorpd %xmm6, %xmm6
+ mulpd %xmm4, %xmm4
+ addpd %xmm2, %xmm1
+ pshufd $68, %xmm4, %xmm5
+ mulpd %xmm0, %xmm4
+ movl $49120, %eax
+ pinsrw $3, %eax, %xmm6
+ mulpd %xmm0, %xmm1
+ mulsd %xmm4, %xmm4
+ addpd %xmm3, %xmm1
+ mulsd %xmm6, %xmm5
+ mulpd %xmm4, %xmm1
+ pshufd $238, %xmm1, %xmm7
+ addsd %xmm7, %xmm1
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_11.0.2:
+ cmpl $16, %ecx
+ jb .L_2TAG_PACKET_12.0.2
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_12.0.2:
+ movapd %xmm0, %xmm1
+ mulsd %xmm1, %xmm1
+ jmp .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_3.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_10.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(log1p)
+# -- End log1p
+
+# Start file scope ASM
+ALIAS_SYMBOL(log1pl, log1p);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 4277811200
+ .long 1072049730
+ .long 2479318832
+ .long 1026487127
+ .long 2854492160
+ .long 1072033410
+ .long 215631550
+ .long 1025638968
+ .long 1547061248
+ .long 1072017216
+ .long 2886781435
+ .long 1026423395
+ .long 649825280
+ .long 1072001146
+ .long 4281533405
+ .long 1024038923
+ .long 646346752
+ .long 1071985198
+ .long 1562735921
+ .long 1023790276
+ .long 2203734016
+ .long 1071969370
+ .long 1838397691
+ .long 3173936209
+ .long 1872169984
+ .long 1071953661
+ .long 3981202460
+ .long 1022325013
+ .long 669557760
+ .long 1071938069
+ .long 4182597802
+ .long 3173174122
+ .long 4076413952
+ .long 1071922591
+ .long 1209029111
+ .long 3170736207
+ .long 556125184
+ .long 1071907228
+ .long 821086028
+ .long 3173437049
+ .long 204914688
+ .long 1071891976
+ .long 2097025986
+ .long 3171071798
+ .long 387545088
+ .long 1071876834
+ .long 3142936996
+ .long 3173092218
+ .long 2912783360
+ .long 1071861800
+ .long 2502420140
+ .long 1024505919
+ .long 1144260608
+ .long 1071846874
+ .long 3315658140
+ .long 3173469843
+ .long 1471209472
+ .long 1071832053
+ .long 129621009
+ .long 3172443877
+ .long 1829683200
+ .long 1071817336
+ .long 3885467693
+ .long 1025535275
+ .long 288676864
+ .long 1071802722
+ .long 86139472
+ .long 3171639793
+ .long 3636378624
+ .long 1071788208
+ .long 1850238587
+ .long 1024654342
+ .long 1606817792
+ .long 1071773795
+ .long 3388899795
+ .long 3173675586
+ .long 1236164608
+ .long 1071759480
+ .long 3983599207
+ .long 1020046558
+ .long 1089616896
+ .long 1071745262
+ .long 4171974224
+ .long 1024773198
+ .long 4143093760
+ .long 1071731139
+ .long 2727587401
+ .long 3173965207
+ .long 600267776
+ .long 1071717112
+ .long 3147685042
+ .long 3173353031
+ .long 2249313280
+ .long 1071703177
+ .long 125835074
+ .long 1025255832
+ .long 3805303808
+ .long 1071689334
+ .long 2289991207
+ .long 1025460331
+ .long 87278592
+ .long 1071675583
+ .long 1106114045
+ .long 1025933602
+ .long 3195405312
+ .long 1071661920
+ .long 3885316576
+ .long 3171206239
+ .long 3853649920
+ .long 1071648346
+ .long 2977069852
+ .long 3171236771
+ .long 2944026624
+ .long 1071625048
+ .long 1008093493
+ .long 1023444474
+ .long 3993180160
+ .long 1071598247
+ .long 1862355595
+ .long 1024642533
+ .long 1454641152
+ .long 1071571617
+ .long 1514603089
+ .long 1026500596
+ .long 3286085632
+ .long 1071545154
+ .long 1400028424
+ .long 3173279056
+ .long 438773760
+ .long 1071518858
+ .long 120727864
+ .long 3172148914
+ .long 1212979200
+ .long 1071492725
+ .long 1625055594
+ .long 3172901933
+ .long 1189017600
+ .long 1071466754
+ .long 3920062376
+ .long 1025727407
+ .long 403064832
+ .long 1071440943
+ .long 1053271728
+ .long 3171391427
+ .long 3343210496
+ .long 1071415289
+ .long 3243395502
+ .long 3173627613
+ .long 1765777408
+ .long 1071389792
+ .long 2145968512
+ .long 1026354304
+ .long 461430784
+ .long 1071364449
+ .long 4094322285
+ .long 1026021467
+ .long 71706624
+ .long 1071339258
+ .long 763632021
+ .long 1024496933
+ .long 1380503552
+ .long 1071314217
+ .long 1383547992
+ .long 3173088453
+ .long 1015732224
+ .long 1071289325
+ .long 3198646877
+ .long 1025390322
+ .long 35977216
+ .long 1071264580
+ .long 2141026805
+ .long 1025754693
+ .long 3927306240
+ .long 1071239979
+ .long 282116272
+ .long 3173394334
+ .long 1125341184
+ .long 1071215523
+ .long 2768427504
+ .long 3172279059
+ .long 1666971648
+ .long 1071191208
+ .long 786837629
+ .long 3172427445
+ .long 2827694080
+ .long 1071167033
+ .long 3857122416
+ .long 3173014241
+ .long 2003683328
+ .long 1071142997
+ .long 859010954
+ .long 1026545007
+ .long 1004017664
+ .long 1071119098
+ .long 3356644970
+ .long 3173458064
+ .long 1753020416
+ .long 1071095334
+ .long 788338552
+ .long 1026157693
+ .long 1992718336
+ .long 1071071704
+ .long 1239179443
+ .long 1026394889
+ .long 3870234624
+ .long 1071048206
+ .long 2082614663
+ .long 1024926053
+ .long 1050437632
+ .long 1071024840
+ .long 660007840
+ .long 1025548499
+ .long 188395520
+ .long 1071001603
+ .long 3878792704
+ .long 3173889571
+ .long 3747176448
+ .long 1070978493
+ .long 144991708
+ .long 3171552042
+ .long 1405669376
+ .long 1070955511
+ .long 3999088879
+ .long 1025486317
+ .long 121151488
+ .long 1070932654
+ .long 2170865497
+ .long 1026473584
+ .long 2652319744
+ .long 1070909920
+ .long 453695652
+ .long 3173916809
+ .long 3262236672
+ .long 1070887309
+ .long 157800053
+ .long 3173984206
+ .long 601221120
+ .long 1070864820
+ .long 3968917661
+ .long 1023992886
+ .long 1999843328
+ .long 1070842450
+ .long 3053895004
+ .long 1024998228
+ .long 1992167424
+ .long 1070820199
+ .long 2968614856
+ .long 1024552653
+ .long 3788726272
+ .long 1070798065
+ .long 3542170808
+ .long 3173573242
+ .long 2094829568
+ .long 1070776048
+ .long 1246758132
+ .long 1026202874
+ .long 288675840
+ .long 1070754146
+ .long 3747328950
+ .long 1026331585
+ .long 1829681152
+ .long 1070732357
+ .long 3125197546
+ .long 1024100318
+ .long 1666869248
+ .long 1070710681
+ .long 1363656119
+ .long 1026336493
+ .long 3417110528
+ .long 1070689116
+ .long 4154791553
+ .long 1026267853
+ .long 2183653376
+ .long 1070667662
+ .long 1671819292
+ .long 3173785870
+ .long 1734434816
+ .long 1070646317
+ .long 373091049
+ .long 1025972363
+ .long 1615681536
+ .long 1070625080
+ .long 384650897
+ .long 1022926043
+ .long 1445382144
+ .long 1070603950
+ .long 344320330
+ .long 3172397196
+ .long 1823715328
+ .long 1070569756
+ .long 3389841200
+ .long 1025231852
+ .long 3839688704
+ .long 1070527917
+ .long 1706790417
+ .long 3167363349
+ .long 4293332992
+ .long 1070486286
+ .long 1614935088
+ .long 1019351591
+ .long 2966720512
+ .long 1070444861
+ .long 4145393717
+ .long 3173711658
+ .long 4066729984
+ .long 1070403639
+ .long 1974925028
+ .long 3171437182
+ .long 3337621504
+ .long 1070362619
+ .long 3314953170
+ .long 3169971314
+ .long 943448064
+ .long 1070321799
+ .long 1498682038
+ .long 3173862340
+ .long 1465634816
+ .long 1070281176
+ .long 1319952810
+ .long 3171693965
+ .long 1015734272
+ .long 1070240749
+ .long 1347821929
+ .long 3173544515
+ .long 118001664
+ .long 1070200516
+ .long 1751482746
+ .long 1026134093
+ .long 3707174912
+ .long 1070160474
+ .long 1486946159
+ .long 1023930920
+ .long 3946381312
+ .long 1070120623
+ .long 2867408081
+ .long 3171368276
+ .long 1699848192
+ .long 1070080961
+ .long 2590187139
+ .long 1025379803
+ .long 2235846656
+ .long 1070041485
+ .long 1888568069
+ .long 3172754960
+ .long 2339729408
+ .long 1070002194
+ .long 3852214753
+ .long 3173323149
+ .long 3196850176
+ .long 1069963086
+ .long 742141560
+ .long 1025101707
+ .long 1800683520
+ .long 1069924160
+ .long 3949500444
+ .long 3172102179
+ .long 3835801600
+ .long 1069885413
+ .long 3848895943
+ .long 1025913832
+ .long 2201202688
+ .long 1069846845
+ .long 1425913464
+ .long 1025868665
+ .long 2778279936
+ .long 1069808453
+ .long 2120889677
+ .long 3173831128
+ .long 2954203136
+ .long 1069770236
+ .long 592147081
+ .long 1019621288
+ .long 210141184
+ .long 1069732193
+ .long 3414275233
+ .long 1023647084
+ .long 709476352
+ .long 1069694321
+ .long 2413027164
+ .long 1024462115
+ .long 2116284416
+ .long 1069656619
+ .long 1144559924
+ .long 1026336654
+ .long 2183651328
+ .long 1069619086
+ .long 3459057650
+ .long 1025634168
+ .long 3047047168
+ .long 1069581720
+ .long 1879674924
+ .long 3173508573
+ .long 970711040
+ .long 1069541521
+ .long 1335954173
+ .long 3173332182
+ .long 2198478848
+ .long 1069467449
+ .long 2951103968
+ .long 3173892200
+ .long 1669611520
+ .long 1069393703
+ .long 531044147
+ .long 1025149248
+ .long 29114368
+ .long 1069320280
+ .long 3327831251
+ .long 1025918673
+ .long 2376949760
+ .long 1069247176
+ .long 737634533
+ .long 3172176000
+ .long 1085390848
+ .long 1069174390
+ .long 3108243400
+ .long 3171828406
+ .long 1566130176
+ .long 1069101918
+ .long 985483226
+ .long 1025708380
+ .long 792780800
+ .long 1069029758
+ .long 4184866295
+ .long 1024426204
+ .long 183156736
+ .long 1068957907
+ .long 2845699378
+ .long 1022107277
+ .long 1301782528
+ .long 1068886362
+ .long 1012735262
+ .long 3173804294
+ .long 1562411008
+ .long 1068815121
+ .long 2197086703
+ .long 3170187813
+ .long 2815549440
+ .long 1068744181
+ .long 2782613207
+ .long 1026345054
+ .long 2756124672
+ .long 1068673540
+ .long 2929486205
+ .long 3173037800
+ .long 3511050240
+ .long 1068603195
+ .long 1443733147
+ .long 3173331549
+ .long 3047047168
+ .long 1068533144
+ .long 1879674924
+ .long 3172459997
+ .long 3221667840
+ .long 1068427825
+ .long 1338588027
+ .long 3171815742
+ .long 3453861888
+ .long 1068288883
+ .long 1205348359
+ .long 3172624626
+ .long 3506110464
+ .long 1068150514
+ .long 893105198
+ .long 1025571866
+ .long 346013696
+ .long 1068012714
+ .long 3495569021
+ .long 3172563349
+ .long 4074029056
+ .long 1067875476
+ .long 3961106338
+ .long 3171065595
+ .long 3559784448
+ .long 1067738798
+ .long 1975385384
+ .long 3173783155
+ .long 797769728
+ .long 1067602675
+ .long 3760305787
+ .long 1026047642
+ .long 2313633792
+ .long 1067467101
+ .long 1559353171
+ .long 1023480256
+ .long 3960766464
+ .long 1067213778
+ .long 1067365107
+ .long 1025865926
+ .long 684261376
+ .long 1066944805
+ .long 844762164
+ .long 3173687482
+ .long 630718464
+ .long 1066676905
+ .long 2458269694
+ .long 1024033081
+ .long 1486061568
+ .long 1066410070
+ .long 115537874
+ .long 3173243995
+ .long 2743664640
+ .long 1065886792
+ .long 3665098304
+ .long 3173471607
+ .long 1971912704
+ .long 1065357333
+ .long 2577214440
+ .long 3171993451
+ .long 1498939392
+ .long 1064306693
+ .long 3409036923
+ .long 1025599151
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 4277811200
+ .long 1067855426
+ .long 2479318832
+ .long 1022292823
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1030730101
+ .long 3217380702
+ .long 1431655765
+ .long 1070945621
+ .long 2576980378
+ .long 1070176665
+ .long 0
+ .long 3219128320
+ .long 0
+ .long 4294959104
+ .long 0
+ .long 4294959104
+ .long 0
+ .long 3217031168
+ .long 2576980378
+ .long 1070176665
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1431655765
+ .long 3217380693
+ .long 1431655765
+ .long 1070945621
+ .type static_const_table,@object
+ .size static_const_table,2192
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_sin.S b/libm/x86/s_sin.S
new file mode 100644
index 0000000..1e6cbd4
--- /dev/null
+++ b/libm/x86/s_sin.S
@@ -0,0 +1,907 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// 1. RANGE REDUCTION
+//
+// We perform an initial range reduction from X to r with
+//
+// X =~= N * pi/32 + r
+//
+// so that |r| <= pi/64 + epsilon. We restrict inputs to those
+// where |N| <= 932560. Beyond this, the range reduction is
+// insufficiently accurate. For extremely small inputs,
+// denormalization can occur internally, impacting performance.
+// This means that the main path is actually only taken for
+// 2^-252 <= |X| < 90112.
+//
+// To avoid branches, we perform the range reduction to full
+// accuracy each time.
+//
+// X - N * (P_1 + P_2 + P_3)
+//
+// where P_1 and P_2 are 32-bit numbers (so multiplication by N
+// is exact) and P_3 is a 53-bit number. Together, these
+// approximate pi well enough for all cases in the restricted
+// range.
+//
+// The main reduction sequence is:
+//
+// y = 32/pi * x
+// N = integer(y)
+// (computed by adding and subtracting off SHIFTER)
+//
+// m_1 = N * P_1
+// m_2 = N * P_2
+// r_1 = x - m_1
+// r = r_1 - m_2
+// (this r can be used for most of the calculation)
+//
+// c_1 = r_1 - r
+// m_3 = N * P_3
+// c_2 = c_1 - m_2
+// c = c_2 - m_3
+//
+// 2. MAIN ALGORITHM
+//
+// The algorithm uses a table lookup based on B = M * pi / 32
+// where M = N mod 64. The stored values are:
+// sigma closest power of 2 to cos(B)
+// C_hl 53-bit cos(B) - sigma
+// S_hi + S_lo 2 * 53-bit sin(B)
+//
+// The computation is organized as follows:
+//
+// sin(B + r + c) = [sin(B) + sigma * r] +
+// r * (cos(B) - sigma) +
+// sin(B) * [cos(r + c) - 1] +
+// cos(B) * [sin(r + c) - r]
+//
+// which is approximately:
+//
+// [S_hi + sigma * r] +
+// C_hl * r +
+// S_lo + S_hi * [(cos(r) - 1) - r * c] +
+// (C_hl + sigma) * [(sin(r) - r) + c]
+//
+// and this is what is actually computed. We separate this sum
+// into four parts:
+//
+// hi + med + pols + corr
+//
+// where
+//
+// hi = S_hi + sigma r
+// med = C_hl * r
+// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+// corr = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+// 3. POLYNOMIAL
+//
+// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+// (sin(r) - r) can be rearranged freely, since it is quite
+// small, so we exploit parallelism to the fullest.
+//
+// psc4 = SC_4 * r_1
+// msc4 = psc4 * r
+// r2 = r * r
+// msc2 = SC_2 * r2
+// r4 = r2 * r2
+// psc3 = SC_3 + msc4
+// psc1 = SC_1 + msc2
+// msc3 = r4 * psc3
+// sincospols = psc1 + msc3
+// pols = sincospols *
+// <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+// 4. CORRECTION TERM
+//
+// This is where the "c" component of the range reduction is
+// taken into account; recall that just "r" is used for most of
+// the calculation.
+//
+// -c = m_3 - c_2
+// -d = S_hi * r - (C_hl + sigma)
+// corr = -c * -d + S_lo
+//
+// 5. COMPENSATED SUMMATIONS
+//
+// The two successive compensated summations add up the high
+// and medium parts, leaving just the low parts to add up at
+// the end.
+//
+// rs = sigma * r
+// res_int = S_hi + rs
+// k_0 = S_hi - res_int
+// k_2 = k_0 + rs
+// med = C_hl * r
+// res_hi = res_int + med
+// k_1 = res_int - res_hi
+// k_3 = k_1 + med
+//
+// 6. FINAL SUMMATION
+//
+// We now add up all the small parts:
+//
+// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+// Now the overall result is just:
+//
+// res_hi + res_lo
+//
+// 7. SMALL ARGUMENTS
+//
+// If |x| < SNN (SNN meaning the smallest normal number), we
+// simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
+// do 2^-55 * (2^55 * x - x).
+//
+// Special cases:
+// sin(NaN) = quiet NaN, and raise invalid exception
+// sin(INF) = NaN and raise invalid exception
+// sin(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin sin
+ENTRY(sin)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 56(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ subl $12336, %eax
+ cmpl $4293, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ movsd 2160(%ebx), %xmm1
+ mulsd %xmm0, %xmm1
+ movsd 2272(%ebx), %xmm5
+ movapd 2256(%ebx), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ movsd 2128(%ebx), %xmm3
+ movapd 2112(%ebx), %xmm2
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %edx
+ cvtsi2sdl %edx, %xmm1
+ mulsd %xmm1, %xmm3
+ unpcklpd %xmm1, %xmm1
+ addl $1865216, %edx
+ movapd %xmm0, %xmm4
+ andl $63, %edx
+ movapd 2096(%ebx), %xmm5
+ lea (%ebx), %eax
+ shll $5, %edx
+ addl %edx, %eax
+ mulpd %xmm1, %xmm2
+ subsd %xmm3, %xmm0
+ mulsd 2144(%ebx), %xmm1
+ subsd %xmm3, %xmm4
+ movsd 8(%eax), %xmm7
+ unpcklpd %xmm0, %xmm0
+ movapd %xmm4, %xmm3
+ subsd %xmm2, %xmm4
+ mulpd %xmm0, %xmm5
+ subpd %xmm2, %xmm0
+ movapd 2064(%ebx), %xmm6
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm2, %xmm3
+ movapd (%eax), %xmm2
+ subsd %xmm3, %xmm1
+ movsd 24(%eax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd 2080(%ebx), %xmm5
+ mulsd (%eax), %xmm4
+ addpd 2048(%ebx), %xmm6
+ mulpd %xmm0, %xmm5
+ movapd %xmm3, %xmm0
+ addsd 8(%eax), %xmm3
+ mulpd %xmm7, %xmm1
+ movapd %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movsd 8(%eax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%eax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm0, %xmm5
+ addsd %xmm7, %xmm3
+ addsd %xmm5, %xmm1
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ unpckhpd %xmm6, %xmm6
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm4
+ movsd %xmm4, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ jg .L_2TAG_PACKET_2.0.2
+ shrl $4, %eax
+ cmpl $268434685, %eax
+ jne .L_2TAG_PACKET_3.0.2
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_3.0.2:
+ movsd 2192(%ebx), %xmm3
+ mulsd %xmm0, %xmm3
+ subsd %xmm0, %xmm3
+ mulsd 2208(%ebx), %xmm3
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movl 132(%esp), %eax
+ andl $2146435072, %eax
+ cmpl $2146435072, %eax
+ je .L_2TAG_PACKET_4.0.2
+ subl $32, %esp
+ movsd %xmm0, (%esp)
+ lea 40(%esp), %eax
+ movl %eax, 8(%esp)
+ movl $2, %eax
+ movl %eax, 12(%esp)
+ call __libm_sincos_huge
+ addl $32, %esp
+ fldl 16(%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_4.0.2:
+ fldl 128(%esp)
+ fmull 2240(%ebx)
+.L_2TAG_PACKET_1.0.2:
+ movl 56(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(sin)
+# -- End sin
+
+# Start file scope ASM
+ALIAS_SYMBOL(sinl, sin);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 1072693248
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 1072693248
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 1071644672
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 1071644672
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 1070596096
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 1070596096
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 1069547520
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 3217031168
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 3218079744
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 3218079744
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 3219128320
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 3219128320
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 3220176896
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 3220176896
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 3219128320
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 3219128320
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 3218079744
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 3218079744
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 3217031168
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 1069547520
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 1070596096
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 1070596096
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 1071644672
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 1071644672
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 1072693248
+ .long 1431655765
+ .long 3217380693
+ .long 0
+ .long 3219128320
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1067799893
+ .long 436314138
+ .long 3207201184
+ .long 381774871
+ .long 3210133868
+ .long 2773927732
+ .long 1053236707
+ .long 436314138
+ .long 1056571808
+ .long 442499072
+ .long 1032893537
+ .long 442499072
+ .long 1032893537
+ .long 1413480448
+ .long 1069097467
+ .long 0
+ .long 0
+ .long 771977331
+ .long 996350346
+ .long 0
+ .long 0
+ .long 1841940611
+ .long 1076125488
+ .long 0
+ .long 0
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 0
+ .long 0
+ .long 1130364928
+ .long 0
+ .long 0
+ .long 0
+ .long 1015021568
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 1072693247
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .type static_const_table,@object
+ .size static_const_table,2288
+ .data
+ .hidden __libm_sincos_huge
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_tan.S b/libm/x86/s_tan.S
new file mode 100644
index 0000000..3ee2107
--- /dev/null
+++ b/libm/x86/s_tan.S
@@ -0,0 +1,1766 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Polynomials coefficients and other constants.
+//
+// Note that in this algorithm, there is a different polynomial for
+// each breakpoint, so there are 32 sets of polynomial coefficients
+// as well as 32 instances of the other constants.
+//
+// The polynomial coefficients and constants are offset from the start
+// of the main block as follows:
+//
+// 0: c8 | c0
+// 16: c9 | c1
+// 32: c10 | c2
+// 48: c11 | c3
+// 64: c12 | c4
+// 80: c13 | c5
+// 96: c14 | c6
+// 112: c15 | c7
+// 128: T_hi
+// 136: T_lo
+// 144: Sigma
+// 152: T_hl
+// 160: Tau
+// 168: Mask
+// 176: (end of block)
+//
+// The total table size is therefore 5632 bytes.
+//
+// Note that c0 and c1 are always zero. We could try storing
+// other constants here, and just loading the low part of the
+// SIMD register in these cases, after ensuring the high part
+// is zero.
+//
+// The higher terms of the polynomial are computed in the *low*
+// part of the SIMD register. This is so we can overlap the
+// multiplication by r^8 and the unpacking of the other part.
+//
+// The constants are:
+// T_hi + T_lo = accurate constant term in power series
+// Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit)
+// Tau = multiplier for the reciprocal, always -1 or 0
+//
+// The basic reconstruction formula using these constants is:
+//
+// High = tau * recip_hi + t_hi
+// Med = (sgn * r + t_hl * r)_hi
+// Low = (sgn * r + t_hl * r)_lo +
+// tau * recip_lo + T_lo + (T_hl + sigma) * c + pol
+//
+// where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15
+//
+// (c0 = c1 = 0, but using them keeps SIMD regularity)
+//
+// We then do a compensated sum High + Med, add the low parts together
+// and then do the final sum.
+//
+// Here recip_hi + recip_lo is an accurate reciprocal of the remainder
+// modulo pi/2
+//
+// Special cases:
+// tan(NaN) = quiet NaN, and raise invalid exception
+// tan(INF) = NaN and raise invalid exception
+// tan(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin tan
+ENTRY(tan)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $120, %esp
+ movl %ebx, 56(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 128(%esp), %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ subl $14368, %eax
+ cmpl $2216, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ movapd 5840(%ebx), %xmm5
+ movapd 5856(%ebx), %xmm6
+ unpcklpd %xmm0, %xmm0
+ movapd 5712(%ebx), %xmm4
+ andpd %xmm0, %xmm4
+ movapd 5632(%ebx), %xmm1
+ mulpd %xmm0, %xmm1
+ orpd %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ movapd %xmm1, %xmm7
+ unpckhpd %xmm7, %xmm7
+ cvttsd2si %xmm7, %edx
+ cvttpd2dq %xmm1, %xmm1
+ cvtdq2pd %xmm1, %xmm1
+ mulpd %xmm6, %xmm1
+ movapd 5664(%ebx), %xmm3
+ movsd 5728(%ebx), %xmm5
+ addl $469248, %edx
+ movapd 5680(%ebx), %xmm4
+ mulpd %xmm1, %xmm3
+ andl $31, %edx
+ mulsd %xmm1, %xmm5
+ movl %edx, %ecx
+ mulpd %xmm1, %xmm4
+ shll $1, %ecx
+ subpd %xmm3, %xmm0
+ mulpd 5696(%ebx), %xmm1
+ addl %ecx, %edx
+ shll $2, %ecx
+ addl %ecx, %edx
+ addsd %xmm0, %xmm5
+ movapd %xmm0, %xmm2
+ subpd %xmm4, %xmm0
+ movsd 5744(%ebx), %xmm6
+ shll $4, %edx
+ lea (%ebx), %eax
+ andpd 5776(%ebx), %xmm5
+ movapd %xmm0, %xmm3
+ addl %edx, %eax
+ subpd %xmm0, %xmm2
+ unpckhpd %xmm0, %xmm0
+ divsd %xmm5, %xmm6
+ subpd %xmm4, %xmm2
+ movapd 16(%eax), %xmm7
+ subsd %xmm5, %xmm3
+ mulpd %xmm0, %xmm7
+ subpd %xmm1, %xmm2
+ movapd 48(%eax), %xmm1
+ mulpd %xmm0, %xmm1
+ movapd 96(%eax), %xmm4
+ mulpd %xmm0, %xmm4
+ addsd %xmm3, %xmm2
+ movapd %xmm0, %xmm3
+ mulpd %xmm0, %xmm0
+ addpd (%eax), %xmm7
+ addpd 32(%eax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd 80(%eax), %xmm4
+ addpd %xmm1, %xmm7
+ movapd 112(%eax), %xmm1
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm0
+ addpd %xmm1, %xmm4
+ movapd 64(%eax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd %xmm1, %xmm7
+ movapd %xmm3, %xmm1
+ mulpd %xmm0, %xmm3
+ mulsd %xmm0, %xmm0
+ mulpd 144(%eax), %xmm1
+ mulpd %xmm3, %xmm4
+ movapd %xmm1, %xmm3
+ addpd %xmm4, %xmm7
+ movapd %xmm1, %xmm4
+ mulsd %xmm7, %xmm0
+ unpckhpd %xmm7, %xmm7
+ addsd %xmm7, %xmm0
+ unpckhpd %xmm1, %xmm1
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ movapd %xmm2, %xmm4
+ movsd 144(%eax), %xmm7
+ unpckhpd %xmm2, %xmm2
+ addsd 152(%eax), %xmm7
+ mulsd %xmm2, %xmm7
+ addsd 136(%eax), %xmm7
+ addsd %xmm1, %xmm7
+ addsd %xmm7, %xmm0
+ movsd 5744(%ebx), %xmm7
+ mulsd %xmm6, %xmm4
+ movsd 168(%eax), %xmm2
+ andpd %xmm6, %xmm2
+ mulsd %xmm2, %xmm5
+ mulsd 160(%eax), %xmm6
+ subsd %xmm5, %xmm7
+ subsd 128(%eax), %xmm2
+ subsd %xmm4, %xmm7
+ mulsd %xmm6, %xmm7
+ movapd %xmm3, %xmm4
+ subsd %xmm2, %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm4
+ addsd %xmm4, %xmm0
+ subsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ movsd %xmm0, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ jg .L_2TAG_PACKET_2.0.2
+ shrl $4, %eax
+ cmpl $268434558, %eax
+ jne .L_2TAG_PACKET_3.0.2
+ movapd %xmm0, %xmm3
+ mulsd 5808(%ebx), %xmm3
+.L_2TAG_PACKET_3.0.2:
+ movsd 5792(%ebx), %xmm3
+ mulsd %xmm0, %xmm3
+ addsd %xmm0, %xmm3
+ mulsd 5808(%ebx), %xmm3
+ movsd %xmm3, (%esp)
+ fldl (%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movq 5712(%ebx), %xmm7
+ andpd %xmm0, %xmm7
+ xorpd %xmm0, %xmm7
+ ucomisd 5760(%ebx), %xmm7
+ je .L_2TAG_PACKET_4.0.2
+ subl $32, %esp
+ movsd %xmm0, (%esp)
+ lea 40(%esp), %eax
+ movl %eax, 8(%esp)
+ movl $2, %eax
+ movl %eax, 12(%esp)
+ call __libm_tancot_huge
+ addl $32, %esp
+ fldl 8(%esp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_4.0.2:
+ movq %xmm0, (%esp)
+ fldl (%esp)
+ fsubl (%esp)
+.L_2TAG_PACKET_1.0.2:
+ movl 56(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(tan)
+# -- End tan
+
+# Start file scope ASM
+ALIAS_SYMBOL(tanl, tan);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1066820852
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1441186365
+ .long 1065494243
+ .long 1431655765
+ .long 1070945621
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 236289504
+ .long 1064135997
+ .long 286331153
+ .long 1069617425
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1160476131
+ .long 1062722102
+ .long 463583772
+ .long 1068212666
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1313038235
+ .long 1066745731
+ .long 0
+ .long 0
+ .long 1013878342
+ .long 1067152618
+ .long 0
+ .long 0
+ .long 3663426833
+ .long 1065725283
+ .long 3693284251
+ .long 1069118808
+ .long 650852232
+ .long 1065882376
+ .long 1996245381
+ .long 1071000265
+ .long 2008746170
+ .long 1064664197
+ .long 3055842593
+ .long 1068578846
+ .long 1495406348
+ .long 1064652437
+ .long 2269530157
+ .long 1069711235
+ .long 285563696
+ .long 1063576465
+ .long 1046897440
+ .long 1067705865
+ .long 233429731
+ .long 1063453151
+ .long 522045958
+ .long 1068476590
+ .long 2354785698
+ .long 1069102779
+ .long 1317599141
+ .long 1012432133
+ .long 0
+ .long 1072693248
+ .long 2828230105
+ .long 1065606626
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1512545955
+ .long 1068119047
+ .long 0
+ .long 0
+ .long 1127048698
+ .long 1067909459
+ .long 0
+ .long 0
+ .long 2300200450
+ .long 1067254767
+ .long 3593250296
+ .long 1070233561
+ .long 3009365544
+ .long 1066902117
+ .long 1127373050
+ .long 1071173457
+ .long 3046103305
+ .long 1066371299
+ .long 24583402
+ .long 1069723988
+ .long 4082511758
+ .long 1065914199
+ .long 3223889699
+ .long 1070020367
+ .long 548927984
+ .long 1065415756
+ .long 558065897
+ .long 1068949418
+ .long 680073315
+ .long 1064940726
+ .long 388873200
+ .long 1068944270
+ .long 3763679576
+ .long 1070167541
+ .long 1497360404
+ .long 1009710547
+ .long 0
+ .long 1072693248
+ .long 64931152
+ .long 1067729411
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2467582782
+ .long 1069256389
+ .long 0
+ .long 0
+ .long 162150096
+ .long 1068946420
+ .long 0
+ .long 0
+ .long 3702794237
+ .long 1068579152
+ .long 3631919291
+ .long 1070936926
+ .long 3456821413
+ .long 1068217218
+ .long 2031366438
+ .long 1071495745
+ .long 1596664020
+ .long 1067799281
+ .long 1509038701
+ .long 1070601643
+ .long 583171477
+ .long 1067510148
+ .long 3785344682
+ .long 1070618476
+ .long 2402036048
+ .long 1067075736
+ .long 3233018412
+ .long 1069913186
+ .long 411280568
+ .long 1066710556
+ .long 1065584192
+ .long 1069747896
+ .long 895247324
+ .long 1070819848
+ .long 500078909
+ .long 3161288781
+ .long 0
+ .long 1072693248
+ .long 729983843
+ .long 1068994194
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1458794562
+ .long 1070398550
+ .long 0
+ .long 0
+ .long 2857777489
+ .long 1070137637
+ .long 0
+ .long 0
+ .long 1024359517
+ .long 1069876531
+ .long 2616040238
+ .long 1071582937
+ .long 1609024636
+ .long 1069675088
+ .long 2529240549
+ .long 1071836633
+ .long 1510128600
+ .long 1069440113
+ .long 2251697184
+ .long 1071253687
+ .long 1262761453
+ .long 1069142850
+ .long 1263091857
+ .long 1071190461
+ .long 3043383486
+ .long 1068885191
+ .long 2476932470
+ .long 1070842002
+ .long 3659995028
+ .long 1068669200
+ .long 855891755
+ .long 1070696894
+ .long 2583490354
+ .long 1071284857
+ .long 3062633575
+ .long 1014008623
+ .long 0
+ .long 1072693248
+ .long 2550940471
+ .long 1069938201
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3422807297
+ .long 1071640847
+ .long 0
+ .long 0
+ .long 1151658053
+ .long 1071494715
+ .long 0
+ .long 0
+ .long 929607071
+ .long 1071346340
+ .long 1037049034
+ .long 1072037305
+ .long 2786928657
+ .long 1071215282
+ .long 1447406859
+ .long 1072265209
+ .long 3490952107
+ .long 1071090851
+ .long 3205232916
+ .long 1071968658
+ .long 1297344304
+ .long 1070977120
+ .long 1066110976
+ .long 1071946035
+ .long 3803721480
+ .long 1070871082
+ .long 1496754229
+ .long 1071807201
+ .long 2982550683
+ .long 1070773243
+ .long 4014441989
+ .long 1071736222
+ .long 419968236
+ .long 1071717047
+ .long 3451266538
+ .long 3163444811
+ .long 0
+ .long 1072693248
+ .long 2960267235
+ .long 1070745841
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 724322768
+ .long 1072881308
+ .long 0
+ .long 0
+ .long 643153048
+ .long 1072905816
+ .long 0
+ .long 0
+ .long 4285079458
+ .long 1072928558
+ .long 3912524733
+ .long 1072622983
+ .long 118362272
+ .long 1072952754
+ .long 4107767972
+ .long 1072827408
+ .long 2689502883
+ .long 1072976922
+ .long 946523347
+ .long 1072772766
+ .long 573204189
+ .long 1073001761
+ .long 581531518
+ .long 1072826391
+ .long 1386236526
+ .long 1073026959
+ .long 3718905905
+ .long 1072832823
+ .long 1145558140
+ .long 1073052673
+ .long 513572637
+ .long 1072861969
+ .long 716700048
+ .long 1071997368
+ .long 547126769
+ .long 1015523525
+ .long 0
+ .long 1072693248
+ .long 1097907398
+ .long 1071420120
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3349892442
+ .long 1074290212
+ .long 0
+ .long 0
+ .long 3913197405
+ .long 1074501181
+ .long 0
+ .long 0
+ .long 2494034522
+ .long 1074739170
+ .long 1264738763
+ .long 1073084804
+ .long 1520293906
+ .long 1074899632
+ .long 1958936600
+ .long 1073411493
+ .long 2133649635
+ .long 1075052171
+ .long 4270740730
+ .long 1073574708
+ .long 1728930189
+ .long 1075224844
+ .long 1303998552
+ .long 1073799186
+ .long 618611933
+ .long 1075420255
+ .long 1769828046
+ .long 1073938542
+ .long 2200537986
+ .long 1075641421
+ .long 433361110
+ .long 1074105369
+ .long 719595600
+ .long 1072317184
+ .long 294527206
+ .long 3162140088
+ .long 0
+ .long 1073741824
+ .long 3811788216
+ .long 3218400550
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1704352102
+ .long 1075943001
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1076258036
+ .long 0
+ .long 0
+ .long 2211264291
+ .long 1076659010
+ .long 0
+ .long 1073741824
+ .long 1441186365
+ .long 1077028579
+ .long 1431655765
+ .long 1074091349
+ .long 876943673
+ .long 1077353622
+ .long 2863311531
+ .long 1074440874
+ .long 236289504
+ .long 1077767485
+ .long 286331153
+ .long 1074860305
+ .long 2805473311
+ .long 1078115278
+ .long 95443718
+ .long 1075163227
+ .long 1160476131
+ .long 1078450742
+ .long 463583772
+ .long 1075552698
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 1073741824
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1330165971
+ .long 3207850745
+ .long 0
+ .long 0
+ .long 217536623
+ .long 1059109098
+ .long 0
+ .long 0
+ .long 3492120849
+ .long 3205151475
+ .long 602185705
+ .long 3215678092
+ .long 760422958
+ .long 1056312597
+ .long 555127889
+ .long 1067545266
+ .long 3139784124
+ .long 3202470837
+ .long 3690544014
+ .long 3213150171
+ .long 95707915
+ .long 1053635428
+ .long 4003114407
+ .long 1064581412
+ .long 2034926231
+ .long 3199711161
+ .long 3759536023
+ .long 3210559989
+ .long 3826928214
+ .long 1050893819
+ .long 3837960785
+ .long 1061790379
+ .long 1526325248
+ .long 3217967566
+ .long 2356426521
+ .long 1025423456
+ .long 0
+ .long 0
+ .long 457728975
+ .long 1071088276
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1398462608
+ .long 3207303968
+ .long 0
+ .long 0
+ .long 26205983
+ .long 1058461213
+ .long 0
+ .long 0
+ .long 56226238
+ .long 3204528612
+ .long 2754706541
+ .long 3215359511
+ .long 2187799823
+ .long 1055634437
+ .long 790323742
+ .long 1067402587
+ .long 1372385848
+ .long 3201651479
+ .long 4097292716
+ .long 3212856302
+ .long 3348210357
+ .long 1052830099
+ .long 2442796466
+ .long 1064337602
+ .long 862608142
+ .long 3198830754
+ .long 170296152
+ .long 3210060867
+ .long 3755571428
+ .long 1049933343
+ .long 3614866008
+ .long 1061361670
+ .long 719978496
+ .long 3217669096
+ .long 1998842465
+ .long 3174703977
+ .long 0
+ .long 0
+ .long 3749156607
+ .long 1071048258
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3120498638
+ .long 3206749304
+ .long 0
+ .long 0
+ .long 2773578114
+ .long 1058009312
+ .long 0
+ .long 0
+ .long 2030783676
+ .long 3203817873
+ .long 2223654598
+ .long 3215071936
+ .long 2976134650
+ .long 1054987244
+ .long 706390066
+ .long 1067217386
+ .long 4258437615
+ .long 3200900378
+ .long 1066252975
+ .long 3212391267
+ .long 815777514
+ .long 1051989462
+ .long 3202745457
+ .long 1064010682
+ .long 2493556375
+ .long 3198004753
+ .long 1046243251
+ .long 3209678971
+ .long 2593078846
+ .long 1049017717
+ .long 2763962276
+ .long 1060970161
+ .long 701480960
+ .long 3217377742
+ .long 3205862232
+ .long 3174660915
+ .long 0
+ .long 0
+ .long 2267016812
+ .long 1071015664
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 2107155798
+ .long 3206166872
+ .long 0
+ .long 0
+ .long 2642992129
+ .long 1057424578
+ .long 0
+ .long 0
+ .long 1936992811
+ .long 3203204426
+ .long 1485063559
+ .long 3214682643
+ .long 1432914553
+ .long 1054319398
+ .long 3996381654
+ .long 1067075828
+ .long 2833029256
+ .long 3200223545
+ .long 2866066872
+ .long 3211982662
+ .long 2432888737
+ .long 1051234178
+ .long 3669764559
+ .long 1063748136
+ .long 2458496952
+ .long 3197170774
+ .long 1948234989
+ .long 3209098147
+ .long 2843698787
+ .long 1048163519
+ .long 3398041407
+ .long 1060559728
+ .long 2829230080
+ .long 3217092115
+ .long 1034046433
+ .long 3174271903
+ .long 0
+ .long 0
+ .long 298675305
+ .long 1070989821
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 437603223
+ .long 3205589761
+ .long 0
+ .long 0
+ .long 759330352
+ .long 1057048511
+ .long 0
+ .long 0
+ .long 3107463368
+ .long 3202507988
+ .long 3144465176
+ .long 3214191500
+ .long 2290961810
+ .long 1053841035
+ .long 1618153340
+ .long 1066971547
+ .long 3836869393
+ .long 3199400272
+ .long 584032116
+ .long 3211469261
+ .long 1245704358
+ .long 1050626462
+ .long 4247487438
+ .long 1063561943
+ .long 1669034927
+ .long 3196274812
+ .long 3844233498
+ .long 3208626322
+ .long 2706958524
+ .long 1047411374
+ .long 3857199098
+ .long 1060281647
+ .long 3593904128
+ .long 3216590719
+ .long 3267547836
+ .long 3172163321
+ .long 0
+ .long 0
+ .long 4076712227
+ .long 1070970214
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3290090340
+ .long 3204793485
+ .long 0
+ .long 0
+ .long 3685760367
+ .long 1056668370
+ .long 0
+ .long 0
+ .long 2655163949
+ .long 3201674917
+ .long 628750575
+ .long 3213566872
+ .long 680140505
+ .long 1053299777
+ .long 2954464709
+ .long 1066900026
+ .long 803201619
+ .long 3198516435
+ .long 1466315631
+ .long 3210837162
+ .long 1611220163
+ .long 1049972438
+ .long 2766187256
+ .long 1063437894
+ .long 1804579484
+ .long 3195331491
+ .long 3695969289
+ .long 3207854418
+ .long 2617238373
+ .long 1046675948
+ .long 3095830084
+ .long 1060095334
+ .long 3789570048
+ .long 3216034914
+ .long 23826559
+ .long 3172048060
+ .long 0
+ .long 0
+ .long 3870939386
+ .long 1070956467
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1571758758
+ .long 3203672535
+ .long 0
+ .long 0
+ .long 113026373
+ .long 1056416381
+ .long 0
+ .long 0
+ .long 1913766298
+ .long 3200523326
+ .long 2507068734
+ .long 3212502004
+ .long 4000648818
+ .long 1053003803
+ .long 2446607349
+ .long 1066858259
+ .long 912662124
+ .long 3197333001
+ .long 1349489537
+ .long 3209765608
+ .long 3412972607
+ .long 1049641401
+ .long 1721283327
+ .long 1063366855
+ .long 1466691883
+ .long 3194116746
+ .long 3852528092
+ .long 3206760861
+ .long 285443293
+ .long 1046158380
+ .long 1758739894
+ .long 1059895449
+ .long 1858781184
+ .long 3214984212
+ .long 3447575948
+ .long 1024675855
+ .long 0
+ .long 0
+ .long 2242038011
+ .long 1070948320
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 737611454
+ .long 1056336527
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3594790527
+ .long 1052911621
+ .long 381774871
+ .long 1066844524
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3303051618
+ .long 1049456050
+ .long 3154187623
+ .long 1063343722
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 528061788
+ .long 1045944910
+ .long 2469719819
+ .long 1059831159
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1431655765
+ .long 1070945621
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1571758758
+ .long 1056188887
+ .long 0
+ .long 0
+ .long 113026373
+ .long 1056416381
+ .long 0
+ .long 0
+ .long 1913766298
+ .long 1053039678
+ .long 2507068734
+ .long 1065018356
+ .long 4000648818
+ .long 1053003803
+ .long 2446607349
+ .long 1066858259
+ .long 912662124
+ .long 1049849353
+ .long 1349489537
+ .long 1062281960
+ .long 3412972607
+ .long 1049641401
+ .long 1721283327
+ .long 1063366855
+ .long 1466691883
+ .long 1046633098
+ .long 3852528092
+ .long 1059277213
+ .long 285443293
+ .long 1046158380
+ .long 1758739894
+ .long 1059895449
+ .long 1858781184
+ .long 1067500564
+ .long 3447575948
+ .long 3172159503
+ .long 0
+ .long 0
+ .long 2242038011
+ .long 1070948320
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3290090340
+ .long 1057309837
+ .long 0
+ .long 0
+ .long 3685760367
+ .long 1056668370
+ .long 0
+ .long 0
+ .long 2655163949
+ .long 1054191269
+ .long 628750575
+ .long 1066083224
+ .long 680140505
+ .long 1053299777
+ .long 2954464709
+ .long 1066900026
+ .long 803201619
+ .long 1051032787
+ .long 1466315631
+ .long 1063353514
+ .long 1611220163
+ .long 1049972438
+ .long 2766187256
+ .long 1063437894
+ .long 1804579484
+ .long 1047847843
+ .long 3695969289
+ .long 1060370770
+ .long 2617238373
+ .long 1046675948
+ .long 3095830084
+ .long 1060095334
+ .long 3789570048
+ .long 1068551266
+ .long 23826559
+ .long 1024564412
+ .long 0
+ .long 0
+ .long 3870939386
+ .long 1070956467
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 437603223
+ .long 1058106113
+ .long 0
+ .long 0
+ .long 759330352
+ .long 1057048511
+ .long 0
+ .long 0
+ .long 3107463368
+ .long 1055024340
+ .long 3144465176
+ .long 1066707852
+ .long 2290961810
+ .long 1053841035
+ .long 1618153340
+ .long 1066971547
+ .long 3836869393
+ .long 1051916624
+ .long 584032116
+ .long 1063985613
+ .long 1245704358
+ .long 1050626462
+ .long 4247487438
+ .long 1063561943
+ .long 1669034927
+ .long 1048791164
+ .long 3844233498
+ .long 1061142674
+ .long 2706958524
+ .long 1047411374
+ .long 3857199098
+ .long 1060281647
+ .long 3593904128
+ .long 1069107071
+ .long 3267547836
+ .long 1024679673
+ .long 0
+ .long 0
+ .long 4076712227
+ .long 1070970214
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 2107155798
+ .long 1058683224
+ .long 0
+ .long 0
+ .long 2642992129
+ .long 1057424578
+ .long 0
+ .long 0
+ .long 1936992811
+ .long 1055720778
+ .long 1485063559
+ .long 1067198995
+ .long 1432914553
+ .long 1054319398
+ .long 3996381654
+ .long 1067075828
+ .long 2833029256
+ .long 1052739897
+ .long 2866066872
+ .long 1064499014
+ .long 2432888737
+ .long 1051234178
+ .long 3669764559
+ .long 1063748136
+ .long 2458496952
+ .long 1049687126
+ .long 1948234989
+ .long 1061614499
+ .long 2843698787
+ .long 1048163519
+ .long 3398041407
+ .long 1060559728
+ .long 2829230080
+ .long 1069608467
+ .long 1034046433
+ .long 1026788255
+ .long 0
+ .long 0
+ .long 298675305
+ .long 1070989821
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3120498638
+ .long 1059265656
+ .long 0
+ .long 0
+ .long 2773578114
+ .long 1058009312
+ .long 0
+ .long 0
+ .long 2030783676
+ .long 1056334225
+ .long 2223654598
+ .long 1067588288
+ .long 2976134650
+ .long 1054987244
+ .long 706390066
+ .long 1067217386
+ .long 4258437615
+ .long 1053416730
+ .long 1066252975
+ .long 1064907619
+ .long 815777514
+ .long 1051989462
+ .long 3202745457
+ .long 1064010682
+ .long 2493556375
+ .long 1050521105
+ .long 1046243251
+ .long 1062195323
+ .long 2593078846
+ .long 1049017717
+ .long 2763962276
+ .long 1060970161
+ .long 701480960
+ .long 1069894094
+ .long 3205862232
+ .long 1027177267
+ .long 0
+ .long 0
+ .long 2267016812
+ .long 1071015664
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1398462608
+ .long 1059820320
+ .long 0
+ .long 0
+ .long 26205983
+ .long 1058461213
+ .long 0
+ .long 0
+ .long 56226238
+ .long 1057044964
+ .long 2754706541
+ .long 1067875863
+ .long 2187799823
+ .long 1055634437
+ .long 790323742
+ .long 1067402587
+ .long 1372385848
+ .long 1054167831
+ .long 4097292716
+ .long 1065372654
+ .long 3348210357
+ .long 1052830099
+ .long 2442796466
+ .long 1064337602
+ .long 862608142
+ .long 1051347106
+ .long 170296152
+ .long 1062577219
+ .long 3755571428
+ .long 1049933343
+ .long 3614866008
+ .long 1061361670
+ .long 719978496
+ .long 1070185448
+ .long 1998842465
+ .long 1027220329
+ .long 0
+ .long 0
+ .long 3749156607
+ .long 1071048258
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1330165971
+ .long 1060367097
+ .long 0
+ .long 0
+ .long 217536623
+ .long 1059109098
+ .long 0
+ .long 0
+ .long 3492120849
+ .long 1057667827
+ .long 602185705
+ .long 1068194444
+ .long 760422958
+ .long 1056312597
+ .long 555127889
+ .long 1067545266
+ .long 3139784124
+ .long 1054987189
+ .long 3690544014
+ .long 1065666523
+ .long 95707915
+ .long 1053635428
+ .long 4003114407
+ .long 1064581412
+ .long 2034926231
+ .long 1052227513
+ .long 3759536023
+ .long 1063076341
+ .long 3826928214
+ .long 1050893819
+ .long 3837960785
+ .long 1061790379
+ .long 1526325248
+ .long 1070483918
+ .long 2356426521
+ .long 3172907104
+ .long 0
+ .long 0
+ .long 457728975
+ .long 1071088276
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1704352102
+ .long 3223426649
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1076258036
+ .long 0
+ .long 0
+ .long 2211264291
+ .long 3224142658
+ .long 0
+ .long 3221225472
+ .long 1441186365
+ .long 1077028579
+ .long 1431655765
+ .long 1074091349
+ .long 876943673
+ .long 3224837270
+ .long 2863311531
+ .long 3221924522
+ .long 236289504
+ .long 1077767485
+ .long 286331153
+ .long 1074860305
+ .long 2805473311
+ .long 3225598926
+ .long 95443718
+ .long 3222646875
+ .long 1160476131
+ .long 1078450742
+ .long 463583772
+ .long 1075552698
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 1073741824
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3349892442
+ .long 3221773860
+ .long 0
+ .long 0
+ .long 3913197405
+ .long 1074501181
+ .long 0
+ .long 0
+ .long 2494034522
+ .long 3222222818
+ .long 1264738763
+ .long 3220568452
+ .long 1520293906
+ .long 1074899632
+ .long 1958936600
+ .long 1073411493
+ .long 2133649635
+ .long 3222535819
+ .long 4270740730
+ .long 3221058356
+ .long 1728930189
+ .long 1075224844
+ .long 1303998552
+ .long 1073799186
+ .long 618611933
+ .long 3222903903
+ .long 1769828046
+ .long 3221422190
+ .long 2200537986
+ .long 1075641421
+ .long 433361110
+ .long 1074105369
+ .long 719595600
+ .long 3219800832
+ .long 294527206
+ .long 1014656440
+ .long 0
+ .long 1073741824
+ .long 3811788216
+ .long 3218400550
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 724322768
+ .long 3220364956
+ .long 0
+ .long 0
+ .long 643153048
+ .long 1072905816
+ .long 0
+ .long 0
+ .long 4285079458
+ .long 3220412206
+ .long 3912524733
+ .long 3220106631
+ .long 118362272
+ .long 1072952754
+ .long 4107767972
+ .long 1072827408
+ .long 2689502883
+ .long 3220460570
+ .long 946523347
+ .long 3220256414
+ .long 573204189
+ .long 1073001761
+ .long 581531518
+ .long 1072826391
+ .long 1386236526
+ .long 3220510607
+ .long 3718905905
+ .long 3220316471
+ .long 1145558140
+ .long 1073052673
+ .long 513572637
+ .long 1072861969
+ .long 716700048
+ .long 3219481016
+ .long 547126769
+ .long 3163007173
+ .long 0
+ .long 1072693248
+ .long 1097907398
+ .long 1071420120
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3422807297
+ .long 3219124495
+ .long 0
+ .long 0
+ .long 1151658053
+ .long 1071494715
+ .long 0
+ .long 0
+ .long 929607071
+ .long 3218829988
+ .long 1037049034
+ .long 3219520953
+ .long 2786928657
+ .long 1071215282
+ .long 1447406859
+ .long 1072265209
+ .long 3490952107
+ .long 3218574499
+ .long 3205232916
+ .long 3219452306
+ .long 1297344304
+ .long 1070977120
+ .long 1066110976
+ .long 1071946035
+ .long 3803721480
+ .long 3218354730
+ .long 1496754229
+ .long 3219290849
+ .long 2982550683
+ .long 1070773243
+ .long 4014441989
+ .long 1071736222
+ .long 419968236
+ .long 3219200695
+ .long 3451266538
+ .long 1015961163
+ .long 0
+ .long 1072693248
+ .long 2960267235
+ .long 1070745841
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1458794562
+ .long 3217882198
+ .long 0
+ .long 0
+ .long 2857777489
+ .long 1070137637
+ .long 0
+ .long 0
+ .long 1024359517
+ .long 3217360179
+ .long 2616040238
+ .long 3219066585
+ .long 1609024636
+ .long 1069675088
+ .long 2529240549
+ .long 1071836633
+ .long 1510128600
+ .long 3216923761
+ .long 2251697184
+ .long 3218737335
+ .long 1262761453
+ .long 1069142850
+ .long 1263091857
+ .long 1071190461
+ .long 3043383486
+ .long 3216368839
+ .long 2476932470
+ .long 3218325650
+ .long 3659995028
+ .long 1068669200
+ .long 855891755
+ .long 1070696894
+ .long 2583490354
+ .long 3218768505
+ .long 3062633575
+ .long 3161492271
+ .long 0
+ .long 1072693248
+ .long 2550940471
+ .long 1069938201
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2467582782
+ .long 3216740037
+ .long 0
+ .long 0
+ .long 162150096
+ .long 1068946420
+ .long 0
+ .long 0
+ .long 3702794237
+ .long 3216062800
+ .long 3631919291
+ .long 3218420574
+ .long 3456821413
+ .long 1068217218
+ .long 2031366438
+ .long 1071495745
+ .long 1596664020
+ .long 3215282929
+ .long 1509038701
+ .long 3218085291
+ .long 583171477
+ .long 1067510148
+ .long 3785344682
+ .long 1070618476
+ .long 2402036048
+ .long 3214559384
+ .long 3233018412
+ .long 3217396834
+ .long 411280568
+ .long 1066710556
+ .long 1065584192
+ .long 1069747896
+ .long 895247324
+ .long 3218303496
+ .long 500078909
+ .long 1013805133
+ .long 0
+ .long 1072693248
+ .long 729983843
+ .long 1068994194
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1512545955
+ .long 3215602695
+ .long 0
+ .long 0
+ .long 1127048698
+ .long 1067909459
+ .long 0
+ .long 0
+ .long 2300200450
+ .long 3214738415
+ .long 3593250296
+ .long 3217717209
+ .long 3009365544
+ .long 1066902117
+ .long 1127373050
+ .long 1071173457
+ .long 3046103305
+ .long 3213854947
+ .long 24583402
+ .long 3217207636
+ .long 4082511758
+ .long 1065914199
+ .long 3223889699
+ .long 1070020367
+ .long 548927984
+ .long 3212899404
+ .long 558065897
+ .long 3216433066
+ .long 680073315
+ .long 1064940726
+ .long 388873200
+ .long 1068944270
+ .long 3763679576
+ .long 3217651189
+ .long 1497360404
+ .long 3157194195
+ .long 0
+ .long 1072693248
+ .long 64931152
+ .long 1067729411
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1313038235
+ .long 3214229379
+ .long 0
+ .long 0
+ .long 1013878342
+ .long 1067152618
+ .long 0
+ .long 0
+ .long 3663426833
+ .long 3213208931
+ .long 3693284251
+ .long 3216602456
+ .long 650852232
+ .long 1065882376
+ .long 1996245381
+ .long 1071000265
+ .long 2008746170
+ .long 3212147845
+ .long 3055842593
+ .long 3216062494
+ .long 1495406348
+ .long 1064652437
+ .long 2269530157
+ .long 1069711235
+ .long 285563696
+ .long 3211060113
+ .long 1046897440
+ .long 3215189513
+ .long 233429731
+ .long 1063453151
+ .long 522045958
+ .long 1068476590
+ .long 2354785698
+ .long 3216586427
+ .long 1317599141
+ .long 3159915781
+ .long 0
+ .long 1072693248
+ .long 2828230105
+ .long 1065606626
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1841940611
+ .long 1071931184
+ .long 1841940611
+ .long 1076125488
+ .long 0
+ .long 1131937792
+ .long 0
+ .long 1127743488
+ .long 1413758976
+ .long 1069097467
+ .long 1413742592
+ .long 1069097467
+ .long 1734819840
+ .long 3174229945
+ .long 1280049152
+ .long 1028033571
+ .long 923219018
+ .long 984130272
+ .long 57701189
+ .long 988383790
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 1734816687
+ .long 1026746297
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 0
+ .long 4294705152
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 0
+ .long 1130364928
+ .long 0
+ .long 0
+ .long 0
+ .long 1015021568
+ .long 0
+ .long 0
+ .long 0
+ .long 1017118720
+ .long 0
+ .long 0
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1076887552
+ .long 0
+ .long 1072693248
+ .type static_const_table,@object
+ .size static_const_table,5872
+ .data
+ .hidden __libm_tancot_huge
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/s_tanh.S b/libm/x86/s_tanh.S
new file mode 100644
index 0000000..737bcbb
--- /dev/null
+++ b/libm/x86/s_tanh.S
@@ -0,0 +1,1361 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x))=(1-exp(-2*x))/(1+exp(-2*x))
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^8*2=int(xH*L2EH*2^9),
+// f=0.b1 b2 ... b8, k integer
+// 2^{-f} is approximated as Tn[f]+Dn[f]
+// Tn stores the high 53 bits, Dn stores (2^{-f}-Tn[f]) rounded to double precision
+//
+// r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-9}+2^{-14},
+// for |x| in [23/64,3*2^7)
+// e^{-2*|x|}=2^{-k-f}*2^{-r} ~ 2^{-k}*(Tn+Dn)*(1+p)=(T0+D0)*(1+p)
+//
+// For |x| in [2^{-4},2^5):
+// 2^{-r}-1 ~ p=c1*r+c2*r^2+..+c5*r^5
+// Let R=1/(1+T0+p*T0), truncated to 35 significant bits
+// R=1/(1+T0+D0+p*(T0+D0))*(1+eps), |eps|<2^{-33}
+// 1+T0+D0+p*(T0+D0)=KH+KL, where
+// KH=(1+T0+c1*r*T0)_high (leading 17 bits)
+// KL=T0_low+D0+(c1*r*T0)_low+c1*r*D0+(c2*r^2+..c5*r^5)*T0
+// eps ~ (R*KH-1)+R*KL
+// 1/(1+T0+D0+p*(T0+D0)) ~ R-R*eps
+// The result is approximated as (1-T0-D0-(T0+D0)*p)*(R-R*eps)
+// 1-T0-D0-(T0+D0)*p=-((KH-2)+KL)
+// The result is formed as
+// (KH-2)*R+(-(KH-2)*R*eps+(KL*R-KL*R*eps)), with the correct sign
+// set at the end
+//
+// For |x| in [2^{-64},2^{-4}):
+// A Taylor series expansion is used (x+p3*x^3+..+p13*x^{13})
+//
+// For |x|<2^{-64}: x is returned
+//
+// For |x|>=2^32: return +/-1
+//
+// Special cases:
+// tanh(NaN) = quiet NaN, and raise invalid exception
+// tanh(INF) = that INF
+// tanh(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin static_func
+ .text
+ .align __bionic_asm_align
+ .type static_func, @function
+static_func:
+..B1.1:
+ call ..L2
+..L2:
+ popl %eax
+ lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax
+ lea static_const_table@GOTOFF(%eax), %eax
+ ret
+ .size static_func,.-static_func
+# -- End static_func
+
+# -- Begin tanh
+ENTRY(tanh)
+# parameter 1: 8 + %ebp
+..B2.1:
+..B2.2:
+ pushl %ebp
+ movl %esp, %ebp
+ subl $104, %esp
+ movl %ebx, 40(%esp)
+ call static_func
+ movl %eax, %ebx
+ movsd 112(%esp), %xmm0
+ movsd 4256(%ebx), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd 4112(%ebx), %xmm1
+ movsd 4120(%ebx), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd 4096(%ebx), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ movl $32768, %edx
+ andl %ecx, %edx
+ andl $32767, %ecx
+ subl $16304, %ecx
+ cmpl $144, %ecx
+ jae .L_2TAG_PACKET_0.0.2
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ movapd %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ movsd 4264(%ebx), %xmm4
+ subsd %xmm6, %xmm3
+ xorpd %xmm0, %xmm0
+ addsd %xmm1, %xmm2
+ subsd %xmm3, %xmm7
+ movapd 4128(%ebx), %xmm6
+ addsd %xmm7, %xmm2
+ movl $255, %ecx
+ andl %eax, %ecx
+ addl %ecx, %ecx
+ movapd (%ebx,%ecx,8), %xmm5
+ shrl $4, %eax
+ andl $65520, %eax
+ subl $16368, %eax
+ negl %eax
+ pinsrw $3, %eax, %xmm0
+ movapd 4144(%ebx), %xmm1
+ pshufd $68, %xmm0, %xmm0
+ mulpd %xmm5, %xmm0
+ movsd 4160(%ebx), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ movapd %xmm4, %xmm5
+ addsd %xmm0, %xmm4
+ mulpd %xmm2, %xmm6
+ mulsd %xmm2, %xmm7
+ mulpd %xmm2, %xmm2
+ addpd %xmm6, %xmm1
+ mulsd %xmm2, %xmm2
+ movsd 4264(%ebx), %xmm3
+ mulpd %xmm2, %xmm1
+ pshufd $78, %xmm1, %xmm6
+ addsd %xmm6, %xmm1
+ movapd %xmm1, %xmm6
+ addsd %xmm7, %xmm1
+ mulsd %xmm0, %xmm1
+ addsd %xmm4, %xmm1
+ andpd 4224(%ebx), %xmm4
+ divsd %xmm1, %xmm5
+ subsd %xmm4, %xmm3
+ pshufd $238, %xmm0, %xmm1
+ addsd %xmm0, %xmm3
+ movapd %xmm4, %xmm2
+ addsd %xmm1, %xmm3
+ mulsd %xmm7, %xmm1
+ mulsd %xmm0, %xmm7
+ addsd %xmm1, %xmm3
+ addsd %xmm7, %xmm4
+ movsd 4240(%ebx), %xmm1
+ mulsd %xmm0, %xmm6
+ andpd 4224(%ebx), %xmm4
+ addsd %xmm6, %xmm3
+ movapd %xmm4, %xmm6
+ subsd %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ movsd 4264(%ebx), %xmm7
+ andpd %xmm1, %xmm5
+ addsd %xmm2, %xmm3
+ mulsd %xmm5, %xmm4
+ xorpd %xmm2, %xmm2
+ mulsd %xmm5, %xmm3
+ subsd 4272(%ebx), %xmm6
+ subsd %xmm7, %xmm4
+ xorl $32768, %edx
+ pinsrw $3, %edx, %xmm2
+ addsd %xmm3, %xmm4
+ mulsd %xmm5, %xmm6
+ movapd %xmm3, %xmm1
+ mulsd %xmm4, %xmm3
+ movapd %xmm6, %xmm0
+ mulsd %xmm4, %xmm6
+ subsd %xmm3, %xmm1
+ subsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_0.0.2:
+ addl $960, %ecx
+ cmpl $1104, %ecx
+ jae .L_2TAG_PACKET_2.0.2
+ movapd 4176(%ebx), %xmm2
+ pshufd $68, %xmm0, %xmm1
+ movapd 4192(%ebx), %xmm3
+ mulpd %xmm1, %xmm1
+ movapd 4208(%ebx), %xmm4
+ mulpd %xmm1, %xmm2
+ pshufd $68, %xmm1, %xmm5
+ addpd %xmm3, %xmm2
+ mulsd %xmm5, %xmm5
+ mulpd %xmm1, %xmm2
+ mulsd %xmm5, %xmm5
+ addpd %xmm4, %xmm2
+ mulpd %xmm5, %xmm2
+ pshufd $238, %xmm2, %xmm5
+ addsd %xmm5, %xmm2
+ mulsd %xmm0, %xmm2
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ addl $15344, %ecx
+ cmpl $16448, %ecx
+ jae .L_2TAG_PACKET_3.0.2
+ cmpl $16, %ecx
+ jb .L_2TAG_PACKET_4.0.2
+ xorpd %xmm2, %xmm2
+ movl $17392, %eax
+ pinsrw $3, %eax, %xmm2
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm2
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_4.0.2:
+ movapd %xmm0, %xmm2
+ mulsd %xmm2, %xmm2
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_3.0.2:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_5.0.2
+ xorpd %xmm2, %xmm2
+ movl $15344, %ecx
+ pinsrw $3, %ecx, %xmm2
+ movapd %xmm2, %xmm3
+ mulsd %xmm2, %xmm2
+ addsd %xmm3, %xmm2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm0, %xmm0
+ orl $16368, %edx
+ pinsrw $3, %edx, %xmm0
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_5.0.2:
+ movapd %xmm0, %xmm2
+ movd %xmm0, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_6.0.2
+ addsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_1.0.2:
+ movsd %xmm0, 24(%esp)
+ fldl 24(%esp)
+.L_2TAG_PACKET_7.0.2:
+ movl 40(%esp), %ebx
+ movl %ebp, %esp
+ popl %ebp
+ ret
+..B2.3:
+END(tanh)
+# -- End tanh
+
+# Start file scope ASM
+ALIAS_SYMBOL(tanhl, tanh);
+# End file scope ASM
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 1797923801
+ .long 1072687577
+ .long 1950547427
+ .long 1013229059
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 915592468
+ .long 1072676282
+ .long 352947894
+ .long 3161024371
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 35929225
+ .long 1072665048
+ .long 2809788041
+ .long 3159436968
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 2038973688
+ .long 1072653874
+ .long 892941374
+ .long 1016046459
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 1222472308
+ .long 1072642761
+ .long 1054357470
+ .long 3161021018
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 481706282
+ .long 1072631708
+ .long 1696079173
+ .long 3162710528
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 2719515920
+ .long 1072620714
+ .long 2760332941
+ .long 1015137933
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2256325230
+ .long 1072609780
+ .long 580117746
+ .long 1015317295
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 2009970496
+ .long 1072598905
+ .long 2159039665
+ .long 3162572948
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 610758006
+ .long 1072588089
+ .long 1965209397
+ .long 3161866232
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 991358482
+ .long 1072577331
+ .long 838715019
+ .long 3163157668
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 1796832535
+ .long 1072566631
+ .long 3176955716
+ .long 3160585513
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 1679558232
+ .long 1072555989
+ .long 2390342287
+ .long 3163333970
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 3594158869
+ .long 1072545404
+ .long 2456521700
+ .long 3163256561
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 1912561781
+ .long 1072534877
+ .long 3147495102
+ .long 1015678253
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3898795731
+ .long 1072524406
+ .long 1249994144
+ .long 1011869818
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 3939148246
+ .long 1072513992
+ .long 3210352148
+ .long 1015274323
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 721996136
+ .long 1072503635
+ .long 563754734
+ .long 1015371318
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1532734324
+ .long 1072493333
+ .long 3094216535
+ .long 3163162857
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 778901109
+ .long 1072483087
+ .long 2248183955
+ .long 3161268751
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 1464976603
+ .long 1072472896
+ .long 3507292405
+ .long 3161977534
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 2307442995
+ .long 1072462760
+ .long 3190117721
+ .long 3162404539
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 2029714210
+ .long 1072452679
+ .long 613660079
+ .long 1015099143
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3657065772
+ .long 1072442652
+ .long 399025623
+ .long 3162957078
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1631695677
+ .long 1072432680
+ .long 2717633076
+ .long 3162344026
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 3287523847
+ .long 1072422761
+ .long 1625971539
+ .long 3157009955
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 3080351519
+ .long 1072412896
+ .long 3379126788
+ .long 3157218001
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4062661092
+ .long 1072403084
+ .long 1422616006
+ .long 3163255318
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 703710506
+ .long 1072393326
+ .long 1384660846
+ .long 1015195891
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 364333489
+ .long 1072383620
+ .long 3923737744
+ .long 3161421373
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 1822067026
+ .long 1072373966
+ .long 1241994956
+ .long 1015340290
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 3861050111
+ .long 1072364364
+ .long 254893773
+ .long 3162813180
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 977020788
+ .long 1072354815
+ .long 3065100517
+ .long 1015541563
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 557149882
+ .long 1072345317
+ .long 3672720709
+ .long 1014537265
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 1405169241
+ .long 1072335870
+ .long 2998539689
+ .long 3162830951
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2331271250
+ .long 1072326474
+ .long 812057446
+ .long 1012207446
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 2152073944
+ .long 1072317129
+ .long 1486860576
+ .long 3163203456
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 3985553595
+ .long 1072307834
+ .long 4002146062
+ .long 1015834136
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 2366108318
+ .long 1072298590
+ .long 2867985102
+ .long 3161762254
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 424392917
+ .long 1072289396
+ .long 2749202995
+ .long 3162838718
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1297350157
+ .long 1072280251
+ .long 1308022040
+ .long 3163412558
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 3833209506
+ .long 1072271155
+ .long 2722920684
+ .long 1013754842
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 2591453363
+ .long 1072262109
+ .long 2132396182
+ .long 3159074198
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 727685349
+ .long 1072253112
+ .long 2038246809
+ .long 3162358742
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 1403662306
+ .long 1072244163
+ .long 2788809599
+ .long 3161671007
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 3492293770
+ .long 1072235262
+ .long 2248032210
+ .long 1015386826
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 1577608921
+ .long 1072226410
+ .long 1875489510
+ .long 3162968394
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 3134592888
+ .long 1072217605
+ .long 4232266862
+ .long 1015991134
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 2759350287
+ .long 1072208848
+ .long 1148526634
+ .long 1015894933
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 3643909174
+ .long 1072200138
+ .long 3537586109
+ .long 1014354647
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 396319521
+ .long 1072191476
+ .long 4172420816
+ .long 3159074632
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 515457527
+ .long 1072182860
+ .long 836709333
+ .long 1015651226
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 2916157145
+ .long 1072174290
+ .long 219487565
+ .long 1015309367
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 2224145553
+ .long 1072165767
+ .long 3482522030
+ .long 3161489169
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 1660913392
+ .long 1072157290
+ .long 4218599604
+ .long 1015135707
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 158781403
+ .long 1072148859
+ .long 2221464712
+ .long 3163286453
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 950803702
+ .long 1072140473
+ .long 1655364926
+ .long 1015237032
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 2980802057
+ .long 1072132132
+ .long 378619896
+ .long 1015773303
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 903334909
+ .long 1072123837
+ .long 1636462108
+ .long 1015039997
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 2263535754
+ .long 1072115586
+ .long 752233586
+ .long 3162639008
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 1727278727
+ .long 1072107380
+ .long 3562710623
+ .long 1011471940
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 2555984613
+ .long 1072099218
+ .long 2652555442
+ .long 3162552692
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 3721688645
+ .long 1072091100
+ .long 3069276937
+ .long 1015839401
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 4201977662
+ .long 1072083026
+ .long 748330254
+ .long 1013594357
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 2979960120
+ .long 1072074996
+ .long 2599109725
+ .long 1014498493
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 3339203574
+ .long 1072067009
+ .long 1483497780
+ .long 3162408754
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 4273770423
+ .long 1072059065
+ .long 3383180809
+ .long 3163218901
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 488188413
+ .long 1072051165
+ .long 3199821029
+ .long 1015564048
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3872257780
+ .long 1072043306
+ .long 1253592103
+ .long 1015958334
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 551349105
+ .long 1072035491
+ .long 3821916050
+ .long 3162106589
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2425981843
+ .long 1072027717
+ .long 2830390851
+ .long 3163346599
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 4222122499
+ .long 1072019985
+ .long 1277378074
+ .long 3163256737
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 671025100
+ .long 1072012296
+ .long 3832014351
+ .long 3163022030
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 3689071823
+ .long 1072004647
+ .long 2321004996
+ .long 3162552716
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3723038930
+ .long 1071997040
+ .long 378465264
+ .long 3162569582
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 4109806887
+ .long 1071989474
+ .long 422403966
+ .long 1014469229
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 3896463087
+ .long 1071981949
+ .long 1139797873
+ .long 3161233805
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 2135241198
+ .long 1071974465
+ .long 1236747871
+ .long 1013589147
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2178460671
+ .long 1071967021
+ .long 777878098
+ .long 3162842493
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3088564500
+ .long 1071959617
+ .long 1762311517
+ .long 1015045673
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 3933059031
+ .long 1071952253
+ .long 2133366768
+ .long 3161531832
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3784486610
+ .long 1071944929
+ .long 1581883040
+ .long 3161698953
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 1720398391
+ .long 1071937645
+ .long 3980678963
+ .long 3163300080
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1118294578
+ .long 1071930400
+ .long 2197495694
+ .long 3159909401
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 1065662932
+ .long 1071923194
+ .long 2533670915
+ .long 1014530238
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 654919306
+ .long 1071916027
+ .long 3232961757
+ .long 3163047469
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 3278348324
+ .long 1071908898
+ .long 3069497416
+ .long 1014750712
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 3743175029
+ .long 1071901808
+ .long 2072812490
+ .long 3162175075
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 1156440435
+ .long 1071894757
+ .long 2351451249
+ .long 1013967056
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 3219942644
+ .long 1071887743
+ .long 3798990616
+ .long 1015368806
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 460407023
+ .long 1071880768
+ .long 4237175092
+ .long 3163138469
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 589198666
+ .long 1071873830
+ .long 2664346172
+ .long 3163157962
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 2732492859
+ .long 1071866929
+ .long 2691479646
+ .long 3162255684
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 1726216749
+ .long 1071860066
+ .long 2466808228
+ .long 3161676405
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 1000925746
+ .long 1071853240
+ .long 1018491672
+ .long 3163309544
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 3991843581
+ .long 1071846450
+ .long 4092853457
+ .long 1014585763
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 1253935211
+ .long 1071839698
+ .long 1395382931
+ .long 3159702613
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 526652809
+ .long 1071832982
+ .long 4223459736
+ .long 1015879375
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 964107055
+ .long 1071826302
+ .long 2800439588
+ .long 3162833221
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 1724976915
+ .long 1071819658
+ .long 420909223
+ .long 3163117379
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 1972484976
+ .long 1071813050
+ .long 675290301
+ .long 3161640050
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 874372905
+ .long 1071806478
+ .long 100263788
+ .long 1015940732
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1897844341
+ .long 1071799941
+ .long 1254300460
+ .long 1015275938
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 4219606026
+ .long 1071793439
+ .long 2434574742
+ .long 1014681548
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2725843665
+ .long 1071786973
+ .long 1433917087
+ .long 1014838523
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 897099801
+ .long 1071780542
+ .long 754756297
+ .long 1015241005
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 2218315341
+ .long 1071774145
+ .long 2694295388
+ .long 3163288868
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 1588871207
+ .long 1071767783
+ .long 143439582
+ .long 3162963416
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2502433899
+ .long 1071761455
+ .long 2148595913
+ .long 1015023991
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 4162030108
+ .long 1071755161
+ .long 2763428480
+ .long 1015529349
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 1480023343
+ .long 1071748902
+ .long 2247196168
+ .long 1015327453
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 2257959872
+ .long 1071742676
+ .long 3802946148
+ .long 1012964927
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 1416741826
+ .long 1071736484
+ .long 2196380210
+ .long 1011413563
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2471440686
+ .long 1071730325
+ .long 968836267
+ .long 3162214888
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 351405227
+ .long 1071724200
+ .long 3125337328
+ .long 3159822479
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 2875075254
+ .long 1071718107
+ .long 4144233330
+ .long 3163333716
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 685187902
+ .long 1071712048
+ .long 378731989
+ .long 1014843115
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 1608493509
+ .long 1071706021
+ .long 3159622171
+ .long 3162807737
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 590962156
+ .long 1071700027
+ .long 3829346666
+ .long 3163275597
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1172597893
+ .long 1071694065
+ .long 114433263
+ .long 1015347593
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 2602514713
+ .long 1071688135
+ .long 2268929336
+ .long 1014354284
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 4133881824
+ .long 1071682237
+ .long 2148155345
+ .long 3162931299
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 728934454
+ .long 1071676372
+ .long 1413842688
+ .long 1014178612
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 238821257
+ .long 1071670538
+ .long 1469694871
+ .long 3162884987
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 1928746161
+ .long 1071664735
+ .long 983617676
+ .long 1014285177
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 772914124
+ .long 1071658964
+ .long 4004372762
+ .long 1012230161
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 339411585
+ .long 1071653224
+ .long 264588982
+ .long 3161636657
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .long 4200250559
+ .long 1071647514
+ .long 2808127345
+ .long 3161781938
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .long 1610612736
+ .long 1082594631
+ .long 4166901572
+ .long 1055174155
+ .long 3884607281
+ .long 3168131199
+ .long 3607404735
+ .long 3190582024
+ .long 1874480759
+ .long 1032041131
+ .long 4286760334
+ .long 1053736893
+ .long 4277811695
+ .long 3211144770
+ .long 0
+ .long 0
+ .long 236289503
+ .long 1064135997
+ .long 463583772
+ .long 3215696314
+ .long 1441186365
+ .long 3212977891
+ .long 286331153
+ .long 1069617425
+ .long 2284589306
+ .long 1066820852
+ .long 1431655765
+ .long 3218429269
+ .long 0
+ .long 4294967280
+ .long 0
+ .long 4294967280
+ .long 4294705152
+ .long 4294967295
+ .long 4294705152
+ .long 4294967295
+ .long 4160749568
+ .long 2147483647
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 1073741824
+ .type static_const_table,@object
+ .size static_const_table,4280
+ .data
+ .section .note.GNU-stack, ""
+# End
diff --git a/libm/x86/sqrt.S b/libm/x86/sqrt.S
new file mode 100644
index 0000000..c9d434d
--- /dev/null
+++ b/libm/x86/sqrt.S
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(sqrt)
+ mov %esp,%eax
+ and $0xfffffff8,%eax
+ movsd 0x4(%esp),%xmm0
+ sqrtsd %xmm0,%xmm0
+ movlpd %xmm0,-0x8(%eax)
+ fldl -0x8(%eax)
+ ret
+END(sqrt)
+
+ALIAS_SYMBOL(sqrtl, sqrt);
diff --git a/libm/x86/sqrtf.S b/libm/x86/sqrtf.S
new file mode 100644
index 0000000..78c183b
--- /dev/null
+++ b/libm/x86/sqrtf.S
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(sqrtf)
+ movss 0x4(%esp),%xmm0
+ sqrtss %xmm0,%xmm0
+ movss %xmm0,-0x4(%esp)
+ flds -0x4(%esp)
+ ret
+END(sqrtf)
diff --git a/libm/x86/trunc.S b/libm/x86/trunc.S
new file mode 100644
index 0000000..da9d5fb
--- /dev/null
+++ b/libm/x86/trunc.S
@@ -0,0 +1,43 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(trunc)
+ mov %esp,%eax
+ and $0xfffffff8,%eax
+ movsd 0x4(%esp),%xmm0
+ roundsd $0x3,%xmm0,%xmm0
+ movlpd %xmm0,-0x8(%eax)
+ fldl -0x8(%eax)
+ ret
+END(trunc)
+
+ALIAS_SYMBOL(truncl, trunc);
diff --git a/libm/x86/truncf.S b/libm/x86/truncf.S
new file mode 100644
index 0000000..d3e3f4a
--- /dev/null
+++ b/libm/x86/truncf.S
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(truncf)
+ movss 0x4(%esp),%xmm0
+ roundss $0x3,%xmm0,%xmm0
+ movss %xmm0,-0x4(%esp)
+ flds -0x4(%esp)
+ ret
+END(truncf)
diff --git a/libm/x86_64/ceil.S b/libm/x86_64/ceil.S
new file mode 100644
index 0000000..d4492c4
--- /dev/null
+++ b/libm/x86_64/ceil.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(ceil)
+roundsd $0x2,%xmm0,%xmm0
+retq
+END(ceil)
diff --git a/libm/x86_64/ceilf.S b/libm/x86_64/ceilf.S
new file mode 100644
index 0000000..0e1ca95
--- /dev/null
+++ b/libm/x86_64/ceilf.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(ceilf)
+roundss $0x2,%xmm0,%xmm0
+retq
+END(ceilf)
diff --git a/libm/x86_64/e_acos.S b/libm/x86_64/e_acos.S
new file mode 100644
index 0000000..d83c66b
--- /dev/null
+++ b/libm/x86_64/e_acos.S
@@ -0,0 +1,1957 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// To compute acos(s), separate schemes are used when s is in different
+// intervals.
+//
+// |s| in [2^{-4}, sqrt(3)/2):
+// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52
+// acos(s)=pi/2-asin(t)-asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2)
+// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7)
+// For the first degree term, r is evaluated as
+// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t)
+// (sqrt(1-t^2) read from table)
+// The main source of error is still R (may still be affected by up to 3 ulps
+// of rounding error). The table size must be sufficiently large, to minimize
+// this effect.
+//
+// |s| in [sqrt(3)/2, 255/256):
+// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded)
+// acos(|s|)=asin(t)-asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2)
+// acos(-|s|)=pi-acos(|s|)
+// (The -PI constant, or 0, is added to the result. The sign is set at
+// the end)
+// asin(r) evaluated as a polynomial (same as above)
+// The first degree term is evaluated as
+// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2))
+//
+// |s|<2^{-4}: acos(s)=pi/2-asin(s)
+// evaluate asin(s) as 13-degree polynomial
+//
+// |s| in [255/256,1): acos(|s|)=2*asin(q), where q=sqrt((1-|s|)/2)
+// asin(q) is evaluated as 13-degree polynomial
+// q^2=(1-|s|)/2 is obtained in advance
+// 2*q*eps ~ ((1-|s|)/2-q^2)/q used for first term
+// acos(-|s|)=pi-acos(|s|)
+// (The -PI constant, or 0, is added to the result. The sign is set at
+// the end)
+//
+// Special cases:
+// acos(NaN) = quiet NaN, and raise invalid exception
+// acos(INF) = QNaN and raise invalid exception
+// acos(x) = QNaN and raise invalid exception, for |x|>1.0
+// acos(1) = +0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin acos
+ENTRY(acos)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_acos.1:
+ subq $24, %rsp
+..___tag_value_acos.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ movsd ABSVALMASK(%rip), %xmm4
+ movsd ONEMASK(%rip), %xmm3
+ xorpd %xmm5, %xmm5
+ movsd TMASK(%rip), %xmm2
+ movq %xmm0, %xmm1
+ psrlq $44, %xmm0
+ movd %xmm0, %edx
+ movq %xmm1, %xmm7
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movq %xmm1, %xmm0
+ movl $524287, %eax
+ andl %edx, %eax
+ subl $260864, %eax
+ cmpl $955, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ mulsd %xmm1, %xmm1
+ andl $65535, %edx
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andpd %xmm7, %xmm2
+ andl $-4, %edx
+ subl $64256, %edx
+ lea T_table(%rip), %r8
+ movsd (%r8,%rdx,2), %xmm1
+ orpd %xmm5, %xmm2
+ lea Tbl_addr(%rip), %r8
+ movapd (%r8,%rdx,4), %xmm4
+ movq %xmm7, %xmm6
+ addsd %xmm2, %xmm7
+ subsd %xmm2, %xmm0
+ mulsd %xmm0, %xmm7
+ mulsd %xmm1, %xmm6
+ mulsd %xmm2, %xmm3
+ movq %xmm6, %xmm1
+ addsd %xmm3, %xmm6
+ divsd %xmm6, %xmm7
+ movsd 24+cv(%rip), %xmm0
+ movsd 8+cv(%rip), %xmm5
+ subsd %xmm3, %xmm1
+ psrlq $63, %xmm2
+ movq %xmm1, %xmm3
+ psllq $63, %xmm2
+ mulsd %xmm1, %xmm1
+ pshufd $68, %xmm2, %xmm2
+ movsd 16+cv(%rip), %xmm6
+ mulsd %xmm1, %xmm3
+ mulsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm4
+ mulsd %xmm3, %xmm5
+ subpd PI_BY_2(%rip), %xmm4
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulsd %xmm3, %xmm0
+ subsd %xmm4, %xmm5
+ pshufd $238, %xmm4, %xmm4
+ addsd %xmm5, %xmm0
+ subsd %xmm7, %xmm0
+ subsd %xmm4, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ subl $955, %eax
+ cmpl $65, %eax
+ jae .L_2TAG_PACKET_1.0.2
+ psrlq $38, %xmm7
+ psllq $38, %xmm7
+ pmovmskb %xmm0, %eax
+ andnpd %xmm0, %xmm4
+ subsd %xmm7, %xmm1
+ movq %xmm7, %xmm6
+ mulsd %xmm7, %xmm7
+ addsd %xmm6, %xmm0
+ orpd %xmm4, %xmm5
+ subsd %xmm7, %xmm3
+ mulsd %xmm1, %xmm0
+ movq %xmm3, %xmm4
+ subsd %xmm0, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andl $128, %eax
+ shrl $7, %eax
+ negl %eax
+ movq %xmm3, %xmm7
+ andpd %xmm3, %xmm2
+ psllq $2, %xmm3
+ pextrw $3, %xmm3, %edx
+ orpd %xmm5, %xmm2
+ movd %eax, %xmm3
+ pshufd $0, %xmm3, %xmm3
+ subl $65216, %edx
+ addl %edx, %edx
+ lea T_table(%rip), %r8
+ mulsd (%r8,%rdx,4), %xmm7
+ mulsd %xmm2, %xmm6
+ mulsd %xmm2, %xmm1
+ mulsd %xmm2, %xmm2
+ subsd %xmm7, %xmm6
+ andpd NEG_PI(%rip), %xmm3
+ addsd %xmm1, %xmm6
+ subsd %xmm2, %xmm4
+ addsd %xmm7, %xmm7
+ movsd 8+cv(%rip), %xmm5
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm7
+ movsd 24+cv(%rip), %xmm0
+ divsd %xmm7, %xmm4
+ movsd 16+cv(%rip), %xmm2
+ lea Tbl_addr(%rip), %r8
+ addpd (%r8,%rdx,8), %xmm3
+ movq %xmm6, %xmm1
+ mulsd %xmm6, %xmm6
+ mulsd %xmm6, %xmm0
+ mulsd %xmm6, %xmm1
+ mulsd %xmm1, %xmm5
+ mulsd %xmm6, %xmm1
+ addsd %xmm2, %xmm0
+ pxor %xmm6, %xmm6
+ mulsd %xmm1, %xmm0
+ addsd %xmm3, %xmm5
+ addsd %xmm5, %xmm0
+ andl $32768, %eax
+ pinsrw $3, %eax, %xmm6
+ movq %xmm4, %xmm5
+ pshufd $238, %xmm3, %xmm3
+ addsd %xmm3, %xmm4
+ subsd %xmm4, %xmm3
+ addsd %xmm3, %xmm5
+ addsd %xmm5, %xmm0
+ addsd %xmm4, %xmm0
+ xorpd %xmm6, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_1.0.2:
+ addl $15291, %eax
+ cmpl $14336, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ unpcklpd %xmm0, %xmm0
+ movapd cv2(%rip), %xmm6
+ unpcklpd %xmm0, %xmm1
+ movapd 16+cv2(%rip), %xmm2
+ movapd 32+cv2(%rip), %xmm4
+ mulpd %xmm0, %xmm0
+ movapd PI_BY_2(%rip), %xmm5
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm6
+ mulpd %xmm0, %xmm0
+ movq %xmm1, %xmm3
+ mulsd %xmm1, %xmm1
+ addpd %xmm2, %xmm6
+ mulpd %xmm0, %xmm4
+ mulsd %xmm3, %xmm1
+ addpd %xmm4, %xmm6
+ pshufd $238, %xmm5, %xmm0
+ mulpd %xmm6, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ subsd %xmm7, %xmm0
+ pshufd $238, %xmm1, %xmm2
+ subsd %xmm1, %xmm5
+ subsd %xmm0, %xmm6
+ subsd %xmm2, %xmm5
+ subsd %xmm6, %xmm7
+ subsd %xmm7, %xmm5
+ addsd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ subl $15356, %eax
+ cmpl $4, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ xorpd %xmm6, %xmm6
+ andpd ABSVALMASK(%rip), %xmm7
+ movsd ONE_BY_2(%rip), %xmm4
+ movapd cv2(%rip), %xmm1
+ mulsd %xmm4, %xmm7
+ movapd 16+cv2(%rip), %xmm2
+ subsd %xmm7, %xmm4
+ movapd 32+cv2(%rip), %xmm3
+ pshufd $68, %xmm4, %xmm7
+ sqrtsd %xmm4, %xmm4
+ mulpd %xmm7, %xmm1
+ pshufd $68, %xmm7, %xmm5
+ pextrw $3, %xmm0, %eax
+ mulpd %xmm7, %xmm7
+ addpd %xmm1, %xmm2
+ movsd HALFMASK(%rip), %xmm1
+ mulpd %xmm7, %xmm3
+ cmpsd $1, %xmm6, %xmm0
+ mulsd %xmm5, %xmm7
+ addpd %xmm3, %xmm2
+ pshufd $68, %xmm0, %xmm0
+ mulsd %xmm7, %xmm2
+ andpd NEG_PI(%rip), %xmm0
+ mulpd %xmm5, %xmm2
+ andpd %xmm4, %xmm1
+ pshufd $68, %xmm4, %xmm3
+ subsd %xmm1, %xmm4
+ addsd %xmm3, %xmm3
+ mulsd %xmm1, %xmm1
+ subsd %xmm4, %xmm3
+ subsd %xmm1, %xmm5
+ mulsd %xmm3, %xmm4
+ pshufd $238, %xmm3, %xmm3
+ subsd %xmm4, %xmm5
+ divsd %xmm3, %xmm5
+ addpd %xmm3, %xmm3
+ mulpd %xmm3, %xmm2
+ pshufd $238, %xmm2, %xmm4
+ addsd %xmm0, %xmm2
+ andl $32768, %eax
+ pinsrw $3, %eax, %xmm6
+ pshufd $238, %xmm0, %xmm0
+ addsd %xmm4, %xmm2
+ addsd %xmm5, %xmm2
+ addsd %xmm3, %xmm2
+ addsd %xmm2, %xmm0
+ xorpd %xmm6, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_3.0.2:
+ addl $261884, %eax
+ cmpl $261888, %eax
+ jb .L_2TAG_PACKET_4.0.2
+ movd %xmm7, %ecx
+ psrlq $32, %xmm7
+ movd %xmm7, %edx
+ andl $2147483647, %edx
+ movl $1072693248, %eax
+ subl %edx, %eax
+ orl %ecx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_5.0.2
+ movsd (%rsp), %xmm2
+ movd %xmm2, %edx
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $2147483647, %ecx
+ subl $1, %edx
+ sbbl $2146435072, %ecx
+ cmpl $0, %ecx
+ jge .L_2TAG_PACKET_6.0.2
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_5.0.2:
+ pextrw $1, %xmm7, %edx
+ shrl $15, %edx
+ negl %edx
+ movd %edx, %xmm7
+ pshufd $0, %xmm7, %xmm7
+ movsd PI(%rip), %xmm2
+ movsd 8+PI(%rip), %xmm0
+ andpd %xmm7, %xmm2
+ andpd %xmm7, %xmm0
+ addsd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ movsd PI_BY_2(%rip), %xmm2
+ movsd 8+PI_BY_2(%rip), %xmm0
+ addsd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm6, %xmm6
+ addsd %xmm6, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_7.0.2:
+ movq %xmm0, 8(%rsp)
+..B1.3:
+ movq 8(%rsp), %xmm0
+.L_2TAG_PACKET_8.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_acos.4:
+ ret
+..___tag_value_acos.5:
+END(acos)
+# -- End acos
+ .section .rodata, "a"
+ .align 16
+ .align 16
+ABSVALMASK:
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 0
+ .type ABSVALMASK,@object
+ .size ABSVALMASK,16
+ .align 16
+T_table:
+ .long 2642784509
+ .long 1072689083
+ .long 1514442531
+ .long 1072688953
+ .long 333108933
+ .long 1072688821
+ .long 3392112024
+ .long 1072688686
+ .long 2099852862
+ .long 1072688550
+ .long 749609004
+ .long 1072688412
+ .long 3634632596
+ .long 1072688271
+ .long 2163248461
+ .long 1072688129
+ .long 628657846
+ .long 1072687985
+ .long 3324036511
+ .long 1072687838
+ .long 1657632815
+ .long 1072687690
+ .long 4217538760
+ .long 1072687539
+ .long 2411951597
+ .long 1072687387
+ .long 533944872
+ .long 1072687233
+ .long 2876566508
+ .long 1072687076
+ .long 847936891
+ .long 1072686918
+ .long 3036019913
+ .long 1072686757
+ .long 848884575
+ .long 1072686595
+ .long 2874443326
+ .long 1072686430
+ .long 520713666
+ .long 1072686264
+ .long 2375556481
+ .long 1072686095
+ .long 4141904948
+ .long 1072685924
+ .long 1522666382
+ .long 1072685752
+ .long 3105624104
+ .long 1072685577
+ .long 298666327
+ .long 1072685401
+ .long 1689524500
+ .long 1072685222
+ .long 2981002200
+ .long 1072685041
+ .long 4170844284
+ .long 1072684858
+ .long 961802263
+ .long 1072684674
+ .long 1941503454
+ .long 1072684487
+ .long 2812647170
+ .long 1072684298
+ .long 3572873869
+ .long 1072684107
+ .long 4219797823
+ .long 1072683914
+ .long 456039788
+ .long 1072683720
+ .long 869096151
+ .long 1072683523
+ .long 1161535119
+ .long 1072683324
+ .long 1330865866
+ .long 1072683123
+ .long 1374571204
+ .long 1072682920
+ .long 1290107538
+ .long 1072682715
+ .long 1074904836
+ .long 1072682508
+ .long 726366587
+ .long 1072682299
+ .long 241869763
+ .long 1072682088
+ .long 3913732079
+ .long 1072681874
+ .long 3149342765
+ .long 1072681659
+ .long 2240966306
+ .long 1072681442
+ .long 1185873216
+ .long 1072681223
+ .long 4276274591
+ .long 1072681001
+ .long 2919452883
+ .long 1072680778
+ .long 1407565635
+ .long 1072680553
+ .long 4032743551
+ .long 1072680325
+ .long 2202188565
+ .long 1072680096
+ .long 207977577
+ .long 1072679865
+ .long 2342160518
+ .long 1072679631
+ .long 11858423
+ .long 1072679396
+ .long 1804034453
+ .long 1072679158
+ .long 3420722787
+ .long 1072678918
+ .long 563930456
+ .long 1072678677
+ .long 1820539192
+ .long 1072678433
+ .long 2892501606
+ .long 1072678187
+ .long 3776710320
+ .long 1072677939
+ .long 175063337
+ .long 1072677690
+ .long 674333171
+ .long 1072677438
+ .long 976363026
+ .long 1072677184
+ .long 1077935934
+ .long 1072676928
+ .long 1921075490
+ .long 1072676540
+ .long 881493302
+ .long 1072676016
+ .long 3275752439
+ .long 1072675483
+ .long 486855588
+ .long 1072674943
+ .long 1077229111
+ .long 1072674394
+ .long 723950308
+ .long 1072673837
+ .long 3693582199
+ .long 1072673271
+ .long 1367335316
+ .long 1072672698
+ .long 2305837020
+ .long 1072672116
+ .long 2184358641
+ .long 1072671526
+ .long 972682840
+ .long 1072670928
+ .long 2935101762
+ .long 1072670321
+ .long 3745513263
+ .long 1072669706
+ .long 3372320886
+ .long 1072669083
+ .long 1783464620
+ .long 1072668452
+ .long 3241386215
+ .long 1072667812
+ .long 3418125284
+ .long 1072667164
+ .long 2280219148
+ .long 1072666508
+ .long 4088700758
+ .long 1072665843
+ .long 219227400
+ .long 1072665171
+ .long 3521816918
+ .long 1072664489
+ .long 1076205279
+ .long 1072663800
+ .long 1436484616
+ .long 1072663102
+ .long 271362610
+ .long 1072662396
+ .long 1838996688
+ .long 1072661681
+ .long 1807122518
+ .long 1072660958
+ .long 137953542
+ .long 1072660227
+ .long 1088178584
+ .long 1072659487
+ .long 324057537
+ .long 1072658739
+ .long 2101288076
+ .long 1072657982
+ .long 2085133974
+ .long 1072657217
+ .long 235324451
+ .long 1072656444
+ .long 806051592
+ .long 1072655662
+ .long 3756033140
+ .long 1072654871
+ .long 453542543
+ .long 1072654073
+ .long 3741177327
+ .long 1072653265
+ .long 691216109
+ .long 1072652450
+ .long 4145223372
+ .long 1072651625
+ .long 1174439091
+ .long 1072650793
+ .long 324416139
+ .long 1072649952
+ .long 1550246310
+ .long 1072649102
+ .long 511524674
+ .long 1072648244
+ .long 1457248482
+ .long 1072647377
+ .long 45944955
+ .long 1072646502
+ .long 525537397
+ .long 1072645618
+ .long 2848440188
+ .long 1072644725
+ .long 2671555633
+ .long 1072643824
+ .long 4241172637
+ .long 1072642914
+ .long 3213094278
+ .long 1072641996
+ .long 3832503688
+ .long 1072641069
+ .long 1754091534
+ .long 1072640134
+ .long 1221921804
+ .long 1072639190
+ .long 2184526489
+ .long 1072638237
+ .long 294902089
+ .long 1072637276
+ .long 4090375270
+ .long 1072636305
+ .long 632860906
+ .long 1072635327
+ .long 2753498702
+ .long 1072634339
+ .long 1808009252
+ .long 1072633343
+ .long 2036428672
+ .long 1072632338
+ .long 3383235626
+ .long 1072631324
+ .long 1497347484
+ .long 1072630302
+ .long 617018317
+ .long 1072629271
+ .long 684933058
+ .long 1072628231
+ .long 1643170798
+ .long 1072627182
+ .long 3011066360
+ .long 1072625592
+ .long 957158713
+ .long 1072623442
+ .long 1390907941
+ .long 1072621256
+ .long 3819155270
+ .long 1072619034
+ .long 3443571196
+ .long 1072616777
+ .long 4045412458
+ .long 1072614484
+ .long 805503923
+ .long 1072612156
+ .long 1778922015
+ .long 1072609791
+ .long 2125033665
+ .long 1072607390
+ .long 1287203863
+ .long 1072604953
+ .long 2992629568
+ .long 1072602479
+ .long 2367267127
+ .long 1072599969
+ .long 3115526047
+ .long 1072597422
+ .long 340219539
+ .long 1072594839
+ .long 2017215719
+ .long 1072592218
+ .long 3225443424
+ .long 1072589560
+ .long 3326565673
+ .long 1072586865
+ .long 1669811211
+ .long 1072584133
+ .long 1886735022
+ .long 1072581363
+ .long 3301071171
+ .long 1072578555
+ .long 928514283
+ .long 1072575710
+ .long 2656364059
+ .long 1072572826
+ .long 3473490507
+ .long 1072569904
+ .long 2649965606
+ .long 1072566944
+ .long 3736819052
+ .long 1072563945
+ .long 1680885175
+ .long 1072560908
+ .long 4413771
+ .long 1072557832
+ .long 2214869753
+ .long 1072554716
+ .long 3214725184
+ .long 1072551561
+ .long 2186079903
+ .long 1072548367
+ .long 2590372131
+ .long 1072545133
+ .long 3578146079
+ .long 1072541859
+ .long 4283712755
+ .long 1072538545
+ .long 3824834510
+ .long 1072535191
+ .long 1302400298
+ .long 1072531797
+ .long 95058636
+ .long 1072528362
+ .long 3563906063
+ .long 1072524885
+ .long 2167230730
+ .long 1072521368
+ .long 3524918334
+ .long 1072517809
+ .long 2353304918
+ .long 1072514209
+ .long 1939625839
+ .long 1072510567
+ .long 1256714581
+ .long 1072506883
+ .long 3552525848
+ .long 1072503156
+ .long 3464809522
+ .long 1072499387
+ .long 4200542593
+ .long 1072495575
+ .long 355609124
+ .long 1072491721
+ .long 3684139099
+ .long 1072487822
+ .long 148355918
+ .long 1072483881
+ .long 1457689242
+ .long 1072479895
+ .long 2118591596
+ .long 1072475865
+ .long 908848089
+ .long 1072471791
+ .long 877032689
+ .long 1072467672
+ .long 752012304
+ .long 1072463508
+ .long 3532301749
+ .long 1072459298
+ .long 3600563221
+ .long 1072455043
+ .long 3902857084
+ .long 1072450742
+ .long 3063101036
+ .long 1072446395
+ .long 3972344374
+ .long 1072442001
+ .long 903183549
+ .long 1072437561
+ .long 983892938
+ .long 1072433073
+ .long 2722858568
+ .long 1072428537
+ .long 302790515
+ .long 1072423954
+ .long 759811057
+ .long 1072419322
+ .long 2507809922
+ .long 1072414641
+ .long 2388408813
+ .long 1072407528
+ .long 2084492942
+ .long 1072397870
+ .long 2435703301
+ .long 1072388010
+ .long 1935433360
+ .long 1072377945
+ .long 2742047290
+ .long 1072367671
+ .long 2053284205
+ .long 1072357185
+ .long 657783367
+ .long 1072346483
+ .long 2893664841
+ .long 1072335560
+ .long 3718906405
+ .long 1072324413
+ .long 1547896303
+ .long 1072313038
+ .long 2494058440
+ .long 1072301429
+ .long 3133238742
+ .long 1072289582
+ .long 3327000086
+ .long 1072277492
+ .long 1860667274
+ .long 1072265154
+ .long 665340747
+ .long 1072252562
+ .long 443347841
+ .long 1072239710
+ .long 581282618
+ .long 1072226592
+ .long 3349780465
+ .long 1072213201
+ .long 914217606
+ .long 1072199532
+ .long 989797661
+ .long 1072185576
+ .long 945436416
+ .long 1072171326
+ .long 549291300
+ .long 1072156774
+ .long 1814636389
+ .long 1072141911
+ .long 239092858
+ .long 1072126729
+ .long 1794680724
+ .long 1072111217
+ .long 1241534678
+ .long 1072095366
+ .long 3366566214
+ .long 1072079164
+ .long 1244090828
+ .long 1072062601
+ .long 1708448120
+ .long 1072045663
+ .long 3544260650
+ .long 1072028337
+ .long 1402741403
+ .long 1072010610
+ .long 2551936888
+ .long 1071992465
+ .long 617669739
+ .long 1071973887
+ .long 794002186
+ .long 1071954857
+ .long 2021237693
+ .long 1071935356
+ .long 540450384
+ .long 1071915364
+ .long 1920555537
+ .long 1071894857
+ .long 2879585206
+ .long 1071873811
+ .long 3000237455
+ .long 1071852199
+ .long 3352974346
+ .long 1071829991
+ .long 569629937
+ .long 1071807155
+ .long 2077237208
+ .long 1071783653
+ .long 2284891805
+ .long 1071759446
+ .long 1226651784
+ .long 1071734489
+ .long 1102047405
+ .long 1071708731
+ .long 2009896384
+ .long 1071682115
+ .long 927419082
+ .long 1071654577
+ .long 85010366
+ .long 1071607413
+ .long 696431025
+ .long 1071548180
+ .long 2611410541
+ .long 1071486585
+ .long 2612593658
+ .long 1071422396
+ .long 3548155306
+ .long 1071355336
+ .long 3887997484
+ .long 1071285073
+ .long 244854763
+ .long 1071211202
+ .long 4214445648
+ .long 1071133216
+ .long 2303966727
+ .long 1071050478
+ .long 3991040013
+ .long 1070962152
+ .long 3126952278
+ .long 1070867118
+ .long 1817448378
+ .long 1070763804
+ .long 1793814864
+ .long 1070649884
+ .long 3507224072
+ .long 1070447193
+ .long 4027609105
+ .long 1070148772
+ .long 577507993
+ .long 1069779414
+ .long 2310232419
+ .long 1068931829
+ .type T_table,@object
+ .size T_table,2048
+ .align 16
+Tbl_addr:
+ .long 3822952792
+ .long 1021639372
+ .long 182792448
+ .long 1068507836
+ .long 2264213271
+ .long 1019558908
+ .long 649052928
+ .long 1068524253
+ .long 1797139609
+ .long 1022295143
+ .long 1243095296
+ .long 1068540671
+ .long 1415938756
+ .long 1021439537
+ .long 2033294592
+ .long 1068557090
+ .long 2356809978
+ .long 1021777916
+ .long 3088063744
+ .long 1068573510
+ .long 2669055318
+ .long 1022124482
+ .long 180888576
+ .long 1068589932
+ .long 3566445325
+ .long 1021358712
+ .long 1970196992
+ .long 1068606354
+ .long 896980323
+ .long 1021319659
+ .long 4229555456
+ .long 1068622777
+ .long 436049712
+ .long 1021319758
+ .long 2732572160
+ .long 1068639202
+ .long 583123209
+ .long 1020797960
+ .long 1842831872
+ .long 1068655628
+ .long 1370449804
+ .long 1021429270
+ .long 1628994560
+ .long 1068672055
+ .long 2411391464
+ .long 1021057980
+ .long 2159763712
+ .long 1068688483
+ .long 1208692749
+ .long 1021943903
+ .long 3503886336
+ .long 1068704912
+ .long 538793309
+ .long 1019744063
+ .long 1435187200
+ .long 1068721343
+ .long 4085087612
+ .long 1020608419
+ .long 317469952
+ .long 1068737775
+ .long 144386942
+ .long 1021440732
+ .long 219617280
+ .long 1068754208
+ .long 2940088361
+ .long 1019981122
+ .long 1210558208
+ .long 1068770642
+ .long 2176850347
+ .long 1018373705
+ .long 3359268352
+ .long 1068787077
+ .long 2395611454
+ .long 1021889042
+ .long 2439803648
+ .long 1068803514
+ .long 1650705253
+ .long 1020227966
+ .long 2816203520
+ .long 1068819952
+ .long 3702166386
+ .long 1019379914
+ .long 262620672
+ .long 1068836392
+ .long 1855649370
+ .long 1020453124
+ .long 3438159616
+ .long 1068852832
+ .long 923063860
+ .long 1019273834
+ .long 3822105856
+ .long 1068869274
+ .long 4289947947
+ .long 1019434249
+ .long 1483729920
+ .long 1068885718
+ .long 787455814
+ .long 1020738379
+ .long 787321088
+ .long 1068902163
+ .long 3321653337
+ .long 1021842569
+ .long 1802253312
+ .long 1068918609
+ .long 2653633526
+ .long 1021821525
+ .long 302985984
+ .long 1068935057
+ .long 161272028
+ .long 1021655149
+ .long 653966080
+ .long 1068951506
+ .long 2566098667
+ .long 1020066219
+ .long 2924727296
+ .long 1068967956
+ .long 3646493722
+ .long 1014292285
+ .long 2889890304
+ .long 1068984408
+ .long 1081009196
+ .long 1022189620
+ .long 619098112
+ .long 1069000862
+ .long 4011643355
+ .long 1021773297
+ .long 477017600
+ .long 1069017317
+ .long 4030305534
+ .long 1021292252
+ .long 2533403904
+ .long 1069033773
+ .long 2645187591
+ .long 1019527099
+ .long 2563102208
+ .long 1069050231
+ .long 3857293792
+ .long 1022311697
+ .long 635982336
+ .long 1069066691
+ .long 3625936637
+ .long 1017511744
+ .long 1116940800
+ .long 1069083152
+ .long 3653872993
+ .long 1022016631
+ .long 4075964160
+ .long 1069099614
+ .long 2468900271
+ .long 1021769532
+ .long 993165568
+ .long 1069116079
+ .long 1358104224
+ .long 1021199776
+ .long 528586752
+ .long 1069132545
+ .long 2200950332
+ .long 1022024872
+ .long 2752395776
+ .long 1069149012
+ .long 3197072454
+ .long 1017751319
+ .long 3439855616
+ .long 1069165481
+ .long 1651081806
+ .long 1020809338
+ .long 2661257728
+ .long 1069181952
+ .long 539032752
+ .long 1021728805
+ .long 486957312
+ .long 1069198425
+ .long 3136045149
+ .long 1016888671
+ .long 1282340352
+ .long 1069214899
+ .long 2593963259
+ .long 1018956103
+ .long 822921728
+ .long 1069231375
+ .long 2146032737
+ .long 1022306465
+ .long 3474216192
+ .long 1069247852
+ .long 3976811625
+ .long 1021350207
+ .long 716902656
+ .long 1069264332
+ .long 718267222
+ .long 1018624727
+ .long 1211594496
+ .long 1069280813
+ .long 1485641389
+ .long 1018447451
+ .long 734070272
+ .long 1069297296
+ .long 354455128
+ .long 1021341291
+ .long 3650110720
+ .long 1069313780
+ .long 682185947
+ .long 1021651853
+ .long 1440663040
+ .long 1069330267
+ .long 3558574550
+ .long 1021615110
+ .long 2766612224
+ .long 1069346755
+ .long 874607978
+ .long 1017746872
+ .long 3404011008
+ .long 1069363245
+ .long 4154988502
+ .long 1021439906
+ .long 3423949056
+ .long 1069379737
+ .long 2263202309
+ .long 1021479615
+ .long 2897587712
+ .long 1069396231
+ .long 2562065031
+ .long 1022090363
+ .long 1896159232
+ .long 1069412727
+ .long 3836237663
+ .long 1019867288
+ .long 490968576
+ .long 1069429225
+ .long 3322056743
+ .long 1006752762
+ .long 3048360192
+ .long 1069445724
+ .long 1152314833
+ .long 1013122252
+ .long 1049850624
+ .long 1069462226
+ .long 3601590727
+ .long 1022214610
+ .long 3156899584
+ .long 1069478729
+ .long 1855169970
+ .long 1019487271
+ .long 851173376
+ .long 1069495235
+ .long 312649594
+ .long 1020868604
+ .long 2794281728
+ .long 1069511742
+ .long 1093490181
+ .long 1020777577
+ .long 468042496
+ .long 1069528252
+ .long 1152540679
+ .long 1021403732
+ .long 2534219264
+ .long 1069544763
+ .long 2292126035
+ .long 1021872430
+ .long 1376146432
+ .long 1069558527
+ .long 3293753641
+ .long 1020500454
+ .long 4175442432
+ .long 1069575044
+ .long 3626347564
+ .long 1021610969
+ .long 3523113472
+ .long 1069591566
+ .long 339956500
+ .long 1021119039
+ .long 4003350528
+ .long 1069608092
+ .long 3429333082
+ .long 1022813542
+ .long 1611067392
+ .long 1069624623
+ .long 2298017544
+ .long 1021977587
+ .long 931782144
+ .long 1069641158
+ .long 2164684743
+ .long 1021250988
+ .long 2256725504
+ .long 1069657697
+ .long 1138762335
+ .long 1021443776
+ .long 1582853120
+ .long 1069674241
+ .long 1084010382
+ .long 1022994693
+ .long 3497758720
+ .long 1069690789
+ .long 406366244
+ .long 1022713586
+ .long 3999816960
+ .long 1069707342
+ .long 1488723042
+ .long 1023381290
+ .long 3383096064
+ .long 1069723900
+ .long 2541558953
+ .long 1019137887
+ .long 1942403584
+ .long 1069740463
+ .long 1879620343
+ .long 1022653642
+ .long 4268263680
+ .long 1069757030
+ .long 3039077047
+ .long 1022252545
+ .long 2067062272
+ .long 1069773603
+ .long 4190670677
+ .long 1020725863
+ .long 4225828096
+ .long 1069790180
+ .long 1998567321
+ .long 1022014385
+ .long 2452507136
+ .long 1069806763
+ .long 1511628873
+ .long 1021900300
+ .long 1340746240
+ .long 1069823351
+ .long 788367341
+ .long 1022726208
+ .long 1190035456
+ .long 1069839944
+ .long 3856337230
+ .long 1021834118
+ .long 2300688384
+ .long 1069856542
+ .long 3211396579
+ .long 1022621365
+ .long 678886400
+ .long 1069873146
+ .long 4001011887
+ .long 1022042646
+ .long 921594112
+ .long 1069889755
+ .long 557811968
+ .long 1023065533
+ .long 3331668992
+ .long 1069906369
+ .long 1877060679
+ .long 1022419742
+ .long 3917875200
+ .long 1069922989
+ .long 1181055171
+ .long 1022752712
+ .long 2984829696
+ .long 1069939615
+ .long 4294526932
+ .long 1021499988
+ .long 838049024
+ .long 1069956247
+ .long 3658081878
+ .long 1022957952
+ .long 2078928384
+ .long 1069972884
+ .long 820353701
+ .long 1019391107
+ .long 2719854336
+ .long 1069989527
+ .long 1644022489
+ .long 1023378240
+ .long 3069117696
+ .long 1070006176
+ .long 2771393702
+ .long 1019319954
+ .long 3435962368
+ .long 1070022831
+ .long 3876394145
+ .long 1023024433
+ .long 4130595328
+ .long 1070039492
+ .long 1630447748
+ .long 1021465882
+ .long 1169236224
+ .long 1070056160
+ .long 2828355997
+ .long 1020458120
+ .long 3453997312
+ .long 1070072833
+ .long 164091641
+ .long 1020388279
+ .long 2708127744
+ .long 1070089513
+ .long 3036550223
+ .long 1023328684
+ .long 3540797696
+ .long 1070106199
+ .long 3710949463
+ .long 1022568805
+ .long 1972276736
+ .long 1070122892
+ .long 3885277950
+ .long 1019761674
+ .long 2613815552
+ .long 1070139591
+ .long 2764165077
+ .long 1022921023
+ .long 1487791616
+ .long 1070156297
+ .long 1330644769
+ .long 1023162679
+ .long 3207593472
+ .long 1070173009
+ .long 3911007221
+ .long 1022993496
+ .long 3797764608
+ .long 1070189728
+ .long 979712598
+ .long 1022554580
+ .long 3578920448
+ .long 1070206454
+ .long 2825738223
+ .long 1020223708
+ .long 2872795648
+ .long 1070223187
+ .long 392451124
+ .long 1022666279
+ .long 2002258432
+ .long 1070239927
+ .long 3730407632
+ .long 1023148291
+ .long 1291326464
+ .long 1070256674
+ .long 3723802980
+ .long 1022514089
+ .long 1065180928
+ .long 1070273428
+ .long 2635617463
+ .long 1022654470
+ .long 1650181632
+ .long 1070290189
+ .long 2061982883
+ .long 1022853411
+ .long 3373882880
+ .long 1070306957
+ .long 319732785
+ .long 1022017175
+ .long 2270081280
+ .long 1070323733
+ .long 2237757411
+ .long 1023064087
+ .long 2963732736
+ .long 1070340516
+ .long 468839165
+ .long 1023293774
+ .long 1491099904
+ .long 1070357307
+ .long 1502657946
+ .long 1021533479
+ .long 2479636480
+ .long 1070374105
+ .long 482913562
+ .long 1021986286
+ .long 1968133632
+ .long 1070390911
+ .long 3281474337
+ .long 1022646400
+ .long 291639040
+ .long 1070407725
+ .long 2453320259
+ .long 1022812423
+ .long 2081472512
+ .long 1070424546
+ .long 2939989570
+ .long 1023091888
+ .long 3380340480
+ .long 1070441375
+ .long 2850707499
+ .long 1021921109
+ .long 232287488
+ .long 1070458213
+ .long 3674625342
+ .long 1020725130
+ .long 1567614208
+ .long 1070475058
+ .long 9347334
+ .long 1022024009
+ .long 3433091072
+ .long 1070491911
+ .long 282524999
+ .long 1021433523
+ .long 1876877312
+ .long 1070508773
+ .long 3470449440
+ .long 1019309721
+ .long 1538472192
+ .long 1070525643
+ .long 2089486825
+ .long 1019698916
+ .long 2763830784
+ .long 1070542521
+ .long 443498115
+ .long 1020505194
+ .long 1605381632
+ .long 1070559408
+ .long 3018871601
+ .long 1022869913
+ .long 2706946048
+ .long 1070576303
+ .long 3936260892
+ .long 1023175875
+ .long 2123887360
+ .long 1070593207
+ .long 2994220655
+ .long 1022825948
+ .long 104015104
+ .long 1070603108
+ .long 335054493
+ .long 1023441853
+ .long 2904568832
+ .long 1070615800
+ .long 1451215633
+ .long 1023853857
+ .long 3456197120
+ .long 1070632739
+ .long 436334733
+ .long 1024026432
+ .long 252452352
+ .long 1070649697
+ .long 34596167
+ .long 1024031396
+ .long 3328018432
+ .long 1070666672
+ .long 2644547073
+ .long 1024296758
+ .long 1255829248
+ .long 1070683667
+ .long 552832586
+ .long 1023763122
+ .long 4097058560
+ .long 1070700680
+ .long 1955640623
+ .long 1021394654
+ .long 451770112
+ .long 1070717714
+ .long 3428903777
+ .long 1022941142
+ .long 408920832
+ .long 1070734767
+ .long 165503263
+ .long 1023894958
+ .long 1186960640
+ .long 1070751840
+ .long 435826450
+ .long 1024026134
+ .long 19078656
+ .long 1070768934
+ .long 1834169749
+ .long 1022899284
+ .long 2743490304
+ .long 1070786048
+ .long 494581074
+ .long 1018818479
+ .long 2328961024
+ .long 1070803184
+ .long 2987908834
+ .long 1022581110
+ .long 350011392
+ .long 1070820342
+ .long 240771184
+ .long 1024143083
+ .long 2692326912
+ .long 1070837521
+ .long 666056837
+ .long 1022394776
+ .long 2373274368
+ .long 1070854723
+ .long 2484337770
+ .long 1024228156
+ .long 1017131520
+ .long 1070871948
+ .long 3285648279
+ .long 1024025789
+ .long 265558272
+ .long 1070889196
+ .long 392241896
+ .long 1024252809
+ .long 1778008064
+ .long 1070906467
+ .long 1536107943
+ .long 1023949300
+ .long 2937184768
+ .long 1070923762
+ .long 3541062251
+ .long 1019448646
+ .long 1144442880
+ .long 1070941082
+ .long 3691683781
+ .long 1022123948
+ .long 2410165504
+ .long 1070958426
+ .long 1804181960
+ .long 1023945221
+ .long 4174350848
+ .long 1070975795
+ .long 2016094861
+ .long 1021716585
+ .long 3897012480
+ .long 1070993190
+ .long 175294410
+ .long 1023703404
+ .long 3353623040
+ .long 1071010611
+ .long 167973242
+ .long 1023240839
+ .long 45671168
+ .long 1071028059
+ .long 2166856113
+ .long 1021565413
+ .long 86063872
+ .long 1071045533
+ .long 2676254727
+ .long 1023985299
+ .long 1019772672
+ .long 1071063034
+ .long 989043593
+ .long 1021549587
+ .long 414297344
+ .long 1071080563
+ .long 3960972046
+ .long 1024307251
+ .long 155173120
+ .long 1071098120
+ .long 1830919291
+ .long 1021592251
+ .long 2151562240
+ .long 1071115705
+ .long 405408666
+ .long 1023423128
+ .long 4041854720
+ .long 1071133319
+ .long 2043497827
+ .long 1024411503
+ .long 3489224192
+ .long 1071150963
+ .long 3072215864
+ .long 1022698635
+ .long 2477196288
+ .long 1071168637
+ .long 1812195139
+ .long 1022689192
+ .long 3015298816
+ .long 1071186341
+ .long 764841969
+ .long 1021027331
+ .long 2844731136
+ .long 1071204076
+ .long 2878117321
+ .long 1019116513
+ .long 4028950528
+ .long 1071221842
+ .long 698911452
+ .long 1023265602
+ .long 69441536
+ .long 1071239641
+ .long 3253467847
+ .long 1020795075
+ .long 1676209920
+ .long 1071257471
+ .long 4272431167
+ .long 1022873982
+ .long 2408752384
+ .long 1071275334
+ .long 648519100
+ .long 1024385717
+ .long 151623680
+ .long 1071293231
+ .long 345257017
+ .long 1019561408
+ .long 1410154240
+ .long 1071311161
+ .long 197863993
+ .long 1023224207
+ .long 4131351552
+ .long 1071329125
+ .long 2620801789
+ .long 1024411169
+ .long 1999664384
+ .long 1071347125
+ .long 3952692616
+ .long 1024168086
+ .long 1617668864
+ .long 1071365160
+ .long 3019889809
+ .long 1021907692
+ .long 1032074240
+ .long 1071383231
+ .long 59469899
+ .long 1023656194
+ .long 2619492096
+ .long 1071401338
+ .long 1417526820
+ .long 1021457783
+ .long 202429440
+ .long 1071419483
+ .long 2927667935
+ .long 1019175447
+ .long 525044224
+ .long 1071437665
+ .long 38166811
+ .long 1023981879
+ .long 1779258880
+ .long 1071455885
+ .long 481252500
+ .long 1023310234
+ .long 2195673600
+ .long 1071474144
+ .long 3962395981
+ .long 1021339088
+ .long 44573696
+ .long 1071492443
+ .long 3936281395
+ .long 1023014829
+ .long 2226905344
+ .long 1071510781
+ .long 1515320476
+ .long 1024320623
+ .long 2800512512
+ .long 1071529160
+ .long 1225403697
+ .long 1021081846
+ .long 161113600
+ .long 1071547581
+ .long 3064809733
+ .long 1024173917
+ .long 1338410240
+ .long 1071566043
+ .long 2027604973
+ .long 1024362526
+ .long 522433280
+ .long 1071584548
+ .long 2055171723
+ .long 1023858825
+ .long 539595776
+ .long 1071603096
+ .long 3868820135
+ .long 1022936424
+ .long 4264017664
+ .long 1071621687
+ .long 3228065145
+ .long 1023479578
+ .long 1733924096
+ .long 1071640324
+ .long 3511934475
+ .long 1022496355
+ .long 108880384
+ .long 1071651839
+ .long 615880967
+ .long 1023519706
+ .long 3517856512
+ .long 1071661202
+ .long 3113108559
+ .long 1025190289
+ .long 4043153152
+ .long 1071670589
+ .long 1571836218
+ .long 1023106116
+ .long 3251299072
+ .long 1071680000
+ .long 3444076102
+ .long 1022187841
+ .long 2736921600
+ .long 1071689435
+ .long 272771483
+ .long 1025095280
+ .long 3897698560
+ .long 1071703633
+ .long 2075390188
+ .long 1022489022
+ .long 3209485056
+ .long 1071722652
+ .long 1438094065
+ .long 1021844944
+ .long 3781432064
+ .long 1071741774
+ .long 1675017145
+ .long 1024143828
+ .long 2684184064
+ .long 1071761003
+ .long 2259963753
+ .long 1024731393
+ .long 1840489728
+ .long 1071780342
+ .long 3372883597
+ .long 1023431408
+ .long 3764087808
+ .long 1071799794
+ .long 3307523102
+ .long 1024485788
+ .long 3006232320
+ .long 1071819364
+ .long 3088971966
+ .long 1025213251
+ .long 3374881280
+ .long 1071839055
+ .long 834437749
+ .long 1025236452
+ .long 797284864
+ .long 1071858872
+ .long 3122663941
+ .long 1025320473
+ .long 545765120
+ .long 1071878818
+ .long 826539625
+ .long 1022450955
+ .long 107562240
+ .long 1071898898
+ .long 339584600
+ .long 1022481255
+ .long 2123649024
+ .long 1071919116
+ .long 3912959833
+ .long 1024321009
+ .long 1562385664
+ .long 1071939478
+ .long 2846067230
+ .long 1023343981
+ .long 2963085824
+ .long 1071959988
+ .long 954548627
+ .long 1021475211
+ .long 3325550592
+ .long 1071980652
+ .long 3459651155
+ .long 1025305573
+ .long 775752448
+ .long 1072001476
+ .long 3582746667
+ .long 1023859460
+ .long 3238590720
+ .long 1072022464
+ .long 634636162
+ .long 1024472353
+ .long 2758801920
+ .long 1072043624
+ .long 3078216319
+ .long 1025304516
+ .long 1370319104
+ .long 1072064962
+ .long 2570569078
+ .long 1025099442
+ .long 2615805184
+ .long 1072086484
+ .long 3729933412
+ .long 1024605112
+ .long 3077336576
+ .long 1072108198
+ .long 1948916066
+ .long 1024781603
+ .long 1099528192
+ .long 1072130112
+ .long 3139143157
+ .long 1023729360
+ .long 1231903232
+ .long 1072152233
+ .long 1349513477
+ .long 1024737515
+ .long 1507504128
+ .long 1072174570
+ .long 3484516322
+ .long 1024000959
+ .long 2214659840
+ .long 1072197132
+ .long 2563820917
+ .long 1025225535
+ .long 1804739840
+ .long 1072219929
+ .long 760038746
+ .long 1024482855
+ .long 1413746688
+ .long 1072242971
+ .long 3401734714
+ .long 1025129838
+ .long 821409536
+ .long 1072266269
+ .long 3729772551
+ .long 1025484796
+ .long 3031825664
+ .long 1072289834
+ .long 122256749
+ .long 1024752594
+ .long 1710784256
+ .long 1072313680
+ .long 1518205483
+ .long 1024724809
+ .long 3025265152
+ .long 1072337819
+ .long 409951989
+ .long 1022835555
+ .long 287769088
+ .long 1072362267
+ .long 800355594
+ .long 1022484850
+ .long 198179840
+ .long 1072387038
+ .long 3502926213
+ .long 1024209373
+ .long 1909130496
+ .long 1072412149
+ .long 3064694319
+ .long 1025380823
+ .long 1941732096
+ .long 1072437619
+ .long 4112930390
+ .long 1024294679
+ .long 3492010496
+ .long 1072463467
+ .long 2684918107
+ .long 1023220233
+ .long 81959680
+ .long 1072489716
+ .long 220021366
+ .long 1020635131
+ .long 2297837056
+ .long 1072516387
+ .long 4027683826
+ .long 1021041185
+ .long 270404096
+ .long 1072543508
+ .long 2012766065
+ .long 1021780753
+ .long 3667376896
+ .long 1072571105
+ .long 2727981522
+ .long 1023009874
+ .long 330400256
+ .long 1072599212
+ .long 2940017003
+ .long 1025393439
+ .long 1119293952
+ .long 1072627861
+ .long 1608550416
+ .long 1022675612
+ .long 3536155904
+ .long 1072657091
+ .long 349665778
+ .long 1025156751
+ .long 3078046720
+ .long 1072686946
+ .long 2016159996
+ .long 1022193169
+ .long 455228416
+ .long 1072705361
+ .long 1908539328
+ .long 1026126332
+ .long 1871505664
+ .long 1072720988
+ .long 2784700894
+ .long 1025922277
+ .long 1630994432
+ .long 1072737010
+ .long 361107678
+ .long 1022887244
+ .long 2084558336
+ .long 1072753462
+ .type Tbl_addr,@object
+ .size Tbl_addr,3840
+ .space 768, 0x00 # pad
+ .align 16
+cv:
+ .long 0
+ .long 0
+ .long 1431655765
+ .long 3217380693
+ .long 858993459
+ .long 3216192307
+ .long 3067833783
+ .long 3215383405
+ .type cv,@object
+ .size cv,32
+ .align 16
+PI_BY_2:
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .type PI_BY_2,@object
+ .size PI_BY_2,16
+ .align 16
+NEG_PI:
+ .long 856972295
+ .long 3164710438
+ .long 1413754136
+ .long 3221823995
+ .type NEG_PI,@object
+ .size NEG_PI,16
+ .align 16
+cv2:
+ .long 780903145
+ .long 1066854586
+ .long 858993459
+ .long 1068708659
+ .long 3340530119
+ .long 1067392113
+ .long 1431655765
+ .long 1069897045
+ .long 1321528399
+ .long 1066517740
+ .long 3067833783
+ .long 1067899757
+ .long 2021159460
+ .long 1065855096
+ .long 2576980378
+ .long 1066178969
+ .type cv2,@object
+ .size cv2,64
+ .align 16
+HALFMASK:
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .type HALFMASK,@object
+ .size HALFMASK,16
+ .align 16
+PI:
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 1074340347
+ .type PI,@object
+ .size PI,16
+ .align 4
+ONEMASK:
+ .long 0
+ .long 1072693248
+ .type ONEMASK,@object
+ .size ONEMASK,8
+ .align 4
+TMASK:
+ .long 0
+ .long 4294950912
+ .type TMASK,@object
+ .size TMASK,8
+ .align 4
+ONE_BY_2:
+ .long 0
+ .long 1071644672
+ .type ONE_BY_2,@object
+ .size ONE_BY_2,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_acos.1-.
+ .4byte ..___tag_value_acos.5-..___tag_value_acos.1
+ .2byte 0x0400
+ .4byte ..___tag_value_acos.3-..___tag_value_acos.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_acos.4-..___tag_value_acos.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_asin.S b/libm/x86_64/e_asin.S
new file mode 100644
index 0000000..9f41c7c
--- /dev/null
+++ b/libm/x86_64/e_asin.S
@@ -0,0 +1,2036 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// To compute asin(s), separate schemes are used when s is in different
+// intervals.
+//
+// |s| in [2^{-4}, sqrt(3)/2):
+// Let t=2^k*1.b1 b2..b6 1, where s=2^k*1.b1 b2 .. b52
+// asin(s)=asin(t)+asin(r), where r=s*sqrt(1-t^2)-t*sqrt(1-s^2)
+// asin(r)-r evaluated as 7-degree polynomial (c3*r^3+c5*r^5+c7*r^7)
+// For the first degree term, r is evaluated as
+// R=(s^2-t^2)/(sqrt(1-t^2)*s+sqrt(1-s^2)*t)
+// (sqrt(1-t^2) read from table)
+// The main source of error is still R (may still be affected by up to 3 ulps
+// of rounding error). The table size must be sufficiently large, to minimize
+// this effect.
+//
+// |s| in [sqrt(3)/2, 255/256):
+// Let t=2^k*1.b1 b2..b6 1, where sqrt(1-s^2)=2^k*1.b1 b2 .. b52 (rounded)
+// asin(|s|)=pi/2-asin(t)+asin(r), r=s*t-sqrt(1-s^2)*sqrt(1-t^2)
+// asin(r) evaluated as polynomial (same as above)
+// The first degree term is evaluated as
+// r=(s^2+t^2-1)/(s*t+sqrt(1-s^2)*sqrt(1-t^2))
+//
+// |s|<2^{-4}: evaluate as 13-degree polynomial
+//
+// |s| in [255/256,1): asin(|s|)=pi/2-asin(sqrt(1-s^2))
+// use 17-degree polynomial, get error term
+// Q*eps ~ (1-s^2-Q^2)/(2*Q) for first term
+// ( Q(1+eps)=sqrt(1-s^2) )
+//
+// Special cases:
+// asin(NaN) = quiet NaN, and raise invalid exception
+// asin(INF) = QNaN and raise invalid exception
+// asin(x) = QNaN and raise invalid exception, for |x|>1.0
+// asin(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin asin
+ENTRY(asin)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_asin.1:
+ subq $24, %rsp
+..___tag_value_asin.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ stmxcsr 16(%rsp)
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ jne .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ movsd ABSVALMASK(%rip), %xmm4
+ movsd ONEMASK(%rip), %xmm3
+ xorpd %xmm5, %xmm5
+ movsd TMASK(%rip), %xmm2
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movq %xmm0, %xmm1
+ psrlq $44, %xmm0
+ movd %xmm0, %edx
+ movq %xmm1, %xmm7
+ movl $8192, %ecx
+ pinsrw $2, %ecx, %xmm5
+ movq %xmm1, %xmm0
+ movl $524287, %eax
+ andl %edx, %eax
+ subl $260864, %eax
+ cmpl $955, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ mulsd %xmm1, %xmm1
+ andl $65535, %edx
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ andpd %xmm7, %xmm2
+ andl $-4, %edx
+ subl $64256, %edx
+ lea T_table(%rip), %r8
+ movsd (%r8,%rdx,2), %xmm1
+ orpd %xmm5, %xmm2
+ lea Tbl_addr(%rip), %r8
+ movapd (%r8,%rdx,4), %xmm4
+ movq %xmm7, %xmm6
+ addsd %xmm2, %xmm7
+ subsd %xmm2, %xmm0
+ mulsd %xmm7, %xmm0
+ mulsd %xmm1, %xmm6
+ mulsd %xmm2, %xmm3
+ movq %xmm6, %xmm1
+ addsd %xmm3, %xmm6
+ divsd %xmm6, %xmm0
+ movsd 16+cv(%rip), %xmm7
+ movsd cv(%rip), %xmm5
+ subsd %xmm3, %xmm1
+ andpd SIGNMASK(%rip), %xmm2
+ movq %xmm1, %xmm3
+ mulsd %xmm1, %xmm1
+ movsd 8+cv(%rip), %xmm6
+ mulsd %xmm1, %xmm3
+ mulsd %xmm1, %xmm7
+ mulsd %xmm3, %xmm5
+ xorpd %xmm2, %xmm4
+ mulsd %xmm1, %xmm3
+ addsd %xmm7, %xmm6
+ mulsd %xmm3, %xmm6
+ addsd %xmm4, %xmm5
+ pshufd $238, %xmm4, %xmm4
+ addsd %xmm5, %xmm6
+ orpd %xmm2, %xmm4
+ addsd %xmm6, %xmm0
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_3.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_3.0.2:
+ addsd %xmm4, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ subl $955, %eax
+ cmpl $67, %eax
+ jae .L_2TAG_PACKET_4.0.2
+ mulsd %xmm1, %xmm1
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ movl %edx, %eax
+ andpd ABSVALMASK(%rip), %xmm0
+ andpd HALFMASK2(%rip), %xmm7
+ movq %xmm0, %xmm1
+ movsd ONEMASK(%rip), %xmm4
+ movq %xmm7, %xmm6
+ subsd %xmm7, %xmm1
+ mulsd %xmm7, %xmm7
+ addsd %xmm6, %xmm0
+ subsd %xmm7, %xmm4
+ mulsd %xmm1, %xmm0
+ movq %xmm3, %xmm7
+ andpd %xmm3, %xmm2
+ psllq $2, %xmm3
+ pextrw $3, %xmm3, %edx
+ orpd %xmm5, %xmm2
+ subl $65216, %edx
+ addl %edx, %edx
+ lea T_table(%rip), %r8
+ mulsd (%r8,%rdx,4), %xmm7
+ mulsd %xmm2, %xmm6
+ movapd PI_BY_2(%rip), %xmm3
+ mulsd %xmm2, %xmm1
+ mulsd %xmm2, %xmm2
+ subsd %xmm7, %xmm6
+ addsd %xmm1, %xmm6
+ subsd %xmm2, %xmm4
+ addsd %xmm7, %xmm7
+ movsd cv(%rip), %xmm5
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm7
+ movsd 16+cv(%rip), %xmm0
+ divsd %xmm7, %xmm4
+ movsd 8+cv(%rip), %xmm2
+ lea Tbl_addr(%rip), %r8
+ subpd (%r8,%rdx,8), %xmm3
+ movq %xmm6, %xmm1
+ mulsd %xmm6, %xmm6
+ andl $524288, %eax
+ shrl $4, %eax
+ mulsd %xmm6, %xmm0
+ mulsd %xmm6, %xmm1
+ mulsd %xmm1, %xmm5
+ mulsd %xmm6, %xmm1
+ addsd %xmm2, %xmm0
+ pxor %xmm6, %xmm6
+ mulsd %xmm1, %xmm0
+ addsd %xmm3, %xmm5
+ pinsrw $3, %eax, %xmm6
+ addsd %xmm5, %xmm0
+ movq %xmm4, %xmm5
+ pshufd $238, %xmm3, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm3
+ subsd %xmm3, %xmm5
+ subsd %xmm5, %xmm0
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_5.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_5.0.2:
+ xorpd %xmm6, %xmm0
+ xorpd %xmm6, %xmm4
+ subsd %xmm4, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ addl $15291, %eax
+ cmpl $14336, %eax
+ jae .L_2TAG_PACKET_6.0.2
+ unpcklpd %xmm7, %xmm7
+ movapd cv2(%rip), %xmm1
+ movapd %xmm7, %xmm6
+ movapd 16+cv2(%rip), %xmm2
+ movapd 32+cv2(%rip), %xmm4
+ mulpd %xmm7, %xmm7
+ mulpd %xmm7, %xmm6
+ mulpd %xmm7, %xmm1
+ mulpd %xmm7, %xmm7
+ movq %xmm6, %xmm3
+ mulsd %xmm6, %xmm6
+ addpd %xmm2, %xmm1
+ mulpd %xmm7, %xmm4
+ mulsd %xmm3, %xmm6
+ addpd %xmm4, %xmm1
+ mulpd %xmm6, %xmm1
+ pshufd $238, %xmm1, %xmm2
+ addsd %xmm2, %xmm1
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_7.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_7.0.2:
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ subl $15358, %eax
+ cmpl $2, %eax
+ jae .L_2TAG_PACKET_8.0.2
+ mulsd %xmm1, %xmm1
+ subsd %xmm1, %xmm3
+ sqrtsd %xmm3, %xmm3
+ movl %edx, %eax
+ andpd HALFMASK(%rip), %xmm7
+ pshufd $68, %xmm3, %xmm5
+ andpd HALFMASK(%rip), %xmm3
+ movq %xmm7, %xmm1
+ movsd ONEMASK(%rip), %xmm4
+ movq %xmm7, %xmm6
+ subsd %xmm7, %xmm0
+ mulsd %xmm7, %xmm7
+ addsd %xmm1, %xmm1
+ mulsd %xmm0, %xmm1
+ subsd %xmm7, %xmm4
+ movq %xmm3, %xmm6
+ mulsd %xmm3, %xmm3
+ mulsd %xmm0, %xmm0
+ subsd %xmm1, %xmm4
+ subsd %xmm5, %xmm6
+ addsd %xmm5, %xmm5
+ subsd %xmm3, %xmm4
+ movapd cv2(%rip), %xmm2
+ pshufd $238, %xmm5, %xmm3
+ subsd %xmm0, %xmm4
+ addsd %xmm6, %xmm5
+ pshufd $238, %xmm3, %xmm7
+ addsd %xmm3, %xmm3
+ mulsd %xmm6, %xmm5
+ addsd %xmm5, %xmm4
+ pshufd $238, %xmm7, %xmm6
+ divsd %xmm3, %xmm4
+ movapd 48+cv2(%rip), %xmm1
+ movapd 16+cv2(%rip), %xmm5
+ movapd 32+cv2(%rip), %xmm0
+ mulpd %xmm7, %xmm7
+ movq %xmm6, %xmm3
+ mulpd %xmm7, %xmm2
+ mulpd %xmm7, %xmm6
+ shrl $4, %eax
+ andl $32768, %eax
+ mulsd %xmm7, %xmm1
+ mulpd %xmm7, %xmm7
+ addpd %xmm2, %xmm5
+ movapd %xmm6, %xmm2
+ mulsd %xmm6, %xmm6
+ mulpd %xmm0, %xmm7
+ movapd PI_BY_2(%rip), %xmm0
+ mulsd %xmm6, %xmm2
+ addpd %xmm5, %xmm7
+ pshufd $238, %xmm1, %xmm5
+ mulsd %xmm2, %xmm6
+ mulpd %xmm2, %xmm7
+ addsd %xmm5, %xmm1
+ xorpd %xmm5, %xmm5
+ pshufd $238, %xmm7, %xmm2
+ mulsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm2, %xmm7
+ movq %xmm3, %xmm2
+ pinsrw $3, %eax, %xmm5
+ subsd %xmm6, %xmm3
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm6
+ addsd %xmm4, %xmm7
+ subsd %xmm6, %xmm2
+ subsd %xmm7, %xmm0
+ subsd %xmm2, %xmm0
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_9.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_9.0.2:
+ xorpd %xmm5, %xmm0
+ xorpd %xmm5, %xmm3
+ subsd %xmm3, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_8.0.2:
+ addl $261886, %eax
+ cmpl $261888, %eax
+ jb .L_2TAG_PACKET_10.0.2
+ movd %xmm0, %ecx
+ psrlq $32, %xmm0
+ movd %xmm0, %edx
+ andl $2147483647, %edx
+ movl $1072693248, %eax
+ subl %edx, %eax
+ orl %ecx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_11.0.2
+ movsd (%rsp), %xmm2
+ movd %xmm2, %edx
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $2147483647, %ecx
+ subl $1, %edx
+ sbbl $2146435072, %ecx
+ cmpl $0, %ecx
+ jge .L_2TAG_PACKET_10.0.2
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_12.0.2
+.L_2TAG_PACKET_11.0.2:
+ movsd ABSVALMASK(%rip), %xmm1
+ movsd PI_BY_2(%rip), %xmm2
+ movsd 8+PI_BY_2(%rip), %xmm0
+ addsd %xmm2, %xmm0
+ andnpd %xmm7, %xmm1
+ orpd %xmm1, %xmm0
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_13.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_13.0.2:
+ jmp ..B1.5
+.L_2TAG_PACKET_10.0.2:
+ movsd (%rsp), %xmm0
+ xorpd %xmm6, %xmm6
+ movq %xmm0, %xmm7
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_14.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_14.0.2:
+ pextrw $3, %xmm0, %edx
+ andl $32752, %edx
+ subl $16, %edx
+ cmpl $32736, %edx
+ jb .L_2TAG_PACKET_15.0.2
+ addsd %xmm0, %xmm6
+ orpd %xmm6, %xmm0
+ mulsd %xmm0, %xmm7
+.L_2TAG_PACKET_15.0.2:
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ movl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_12.0.2:
+ movl 16(%rsp), %eax
+ andl $-24577, %eax
+ cmpl 16(%rsp), %eax
+ je .L_2TAG_PACKET_16.0.2
+ stmxcsr 20(%rsp)
+ movl 16(%rsp), %eax
+ andl $24576, %eax
+ orl %eax, 20(%rsp)
+ ldmxcsr 20(%rsp)
+.L_2TAG_PACKET_16.0.2:
+ movq %xmm0, 8(%rsp)
+..B1.3:
+ movq 8(%rsp), %xmm0
+.L_2TAG_PACKET_17.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_asin.4:
+ ret
+..___tag_value_asin.5:
+END(asin)
+# -- End asin
+ .section .rodata, "a"
+ .align 16
+ .align 16
+ABSVALMASK:
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 0
+ .type ABSVALMASK,@object
+ .size ABSVALMASK,16
+ .align 16
+T_table:
+ .long 2642784509
+ .long 1072689083
+ .long 1514442531
+ .long 1072688953
+ .long 333108933
+ .long 1072688821
+ .long 3392112024
+ .long 1072688686
+ .long 2099852862
+ .long 1072688550
+ .long 749609004
+ .long 1072688412
+ .long 3634632596
+ .long 1072688271
+ .long 2163248461
+ .long 1072688129
+ .long 628657846
+ .long 1072687985
+ .long 3324036511
+ .long 1072687838
+ .long 1657632815
+ .long 1072687690
+ .long 4217538760
+ .long 1072687539
+ .long 2411951597
+ .long 1072687387
+ .long 533944872
+ .long 1072687233
+ .long 2876566508
+ .long 1072687076
+ .long 847936891
+ .long 1072686918
+ .long 3036019913
+ .long 1072686757
+ .long 848884575
+ .long 1072686595
+ .long 2874443326
+ .long 1072686430
+ .long 520713666
+ .long 1072686264
+ .long 2375556481
+ .long 1072686095
+ .long 4141904948
+ .long 1072685924
+ .long 1522666382
+ .long 1072685752
+ .long 3105624104
+ .long 1072685577
+ .long 298666327
+ .long 1072685401
+ .long 1689524500
+ .long 1072685222
+ .long 2981002200
+ .long 1072685041
+ .long 4170844284
+ .long 1072684858
+ .long 961802263
+ .long 1072684674
+ .long 1941503454
+ .long 1072684487
+ .long 2812647170
+ .long 1072684298
+ .long 3572873869
+ .long 1072684107
+ .long 4219797823
+ .long 1072683914
+ .long 456039788
+ .long 1072683720
+ .long 869096151
+ .long 1072683523
+ .long 1161535119
+ .long 1072683324
+ .long 1330865866
+ .long 1072683123
+ .long 1374571204
+ .long 1072682920
+ .long 1290107538
+ .long 1072682715
+ .long 1074904836
+ .long 1072682508
+ .long 726366587
+ .long 1072682299
+ .long 241869763
+ .long 1072682088
+ .long 3913732079
+ .long 1072681874
+ .long 3149342765
+ .long 1072681659
+ .long 2240966306
+ .long 1072681442
+ .long 1185873216
+ .long 1072681223
+ .long 4276274591
+ .long 1072681001
+ .long 2919452883
+ .long 1072680778
+ .long 1407565635
+ .long 1072680553
+ .long 4032743551
+ .long 1072680325
+ .long 2202188565
+ .long 1072680096
+ .long 207977577
+ .long 1072679865
+ .long 2342160518
+ .long 1072679631
+ .long 11858423
+ .long 1072679396
+ .long 1804034453
+ .long 1072679158
+ .long 3420722787
+ .long 1072678918
+ .long 563930456
+ .long 1072678677
+ .long 1820539192
+ .long 1072678433
+ .long 2892501606
+ .long 1072678187
+ .long 3776710320
+ .long 1072677939
+ .long 175063337
+ .long 1072677690
+ .long 674333171
+ .long 1072677438
+ .long 976363026
+ .long 1072677184
+ .long 1077935934
+ .long 1072676928
+ .long 1921075490
+ .long 1072676540
+ .long 881493302
+ .long 1072676016
+ .long 3275752439
+ .long 1072675483
+ .long 486855588
+ .long 1072674943
+ .long 1077229111
+ .long 1072674394
+ .long 723950308
+ .long 1072673837
+ .long 3693582199
+ .long 1072673271
+ .long 1367335316
+ .long 1072672698
+ .long 2305837020
+ .long 1072672116
+ .long 2184358641
+ .long 1072671526
+ .long 972682840
+ .long 1072670928
+ .long 2935101762
+ .long 1072670321
+ .long 3745513263
+ .long 1072669706
+ .long 3372320886
+ .long 1072669083
+ .long 1783464620
+ .long 1072668452
+ .long 3241386215
+ .long 1072667812
+ .long 3418125284
+ .long 1072667164
+ .long 2280219148
+ .long 1072666508
+ .long 4088700758
+ .long 1072665843
+ .long 219227400
+ .long 1072665171
+ .long 3521816918
+ .long 1072664489
+ .long 1076205279
+ .long 1072663800
+ .long 1436484616
+ .long 1072663102
+ .long 271362610
+ .long 1072662396
+ .long 1838996688
+ .long 1072661681
+ .long 1807122518
+ .long 1072660958
+ .long 137953542
+ .long 1072660227
+ .long 1088178584
+ .long 1072659487
+ .long 324057537
+ .long 1072658739
+ .long 2101288076
+ .long 1072657982
+ .long 2085133974
+ .long 1072657217
+ .long 235324451
+ .long 1072656444
+ .long 806051592
+ .long 1072655662
+ .long 3756033140
+ .long 1072654871
+ .long 453542543
+ .long 1072654073
+ .long 3741177327
+ .long 1072653265
+ .long 691216109
+ .long 1072652450
+ .long 4145223372
+ .long 1072651625
+ .long 1174439091
+ .long 1072650793
+ .long 324416139
+ .long 1072649952
+ .long 1550246310
+ .long 1072649102
+ .long 511524674
+ .long 1072648244
+ .long 1457248482
+ .long 1072647377
+ .long 45944955
+ .long 1072646502
+ .long 525537397
+ .long 1072645618
+ .long 2848440188
+ .long 1072644725
+ .long 2671555633
+ .long 1072643824
+ .long 4241172637
+ .long 1072642914
+ .long 3213094278
+ .long 1072641996
+ .long 3832503688
+ .long 1072641069
+ .long 1754091534
+ .long 1072640134
+ .long 1221921804
+ .long 1072639190
+ .long 2184526489
+ .long 1072638237
+ .long 294902089
+ .long 1072637276
+ .long 4090375270
+ .long 1072636305
+ .long 632860906
+ .long 1072635327
+ .long 2753498702
+ .long 1072634339
+ .long 1808009252
+ .long 1072633343
+ .long 2036428672
+ .long 1072632338
+ .long 3383235626
+ .long 1072631324
+ .long 1497347484
+ .long 1072630302
+ .long 617018317
+ .long 1072629271
+ .long 684933058
+ .long 1072628231
+ .long 1643170798
+ .long 1072627182
+ .long 3011066360
+ .long 1072625592
+ .long 957158713
+ .long 1072623442
+ .long 1390907941
+ .long 1072621256
+ .long 3819155270
+ .long 1072619034
+ .long 3443571196
+ .long 1072616777
+ .long 4045412458
+ .long 1072614484
+ .long 805503923
+ .long 1072612156
+ .long 1778922015
+ .long 1072609791
+ .long 2125033665
+ .long 1072607390
+ .long 1287203863
+ .long 1072604953
+ .long 2992629568
+ .long 1072602479
+ .long 2367267127
+ .long 1072599969
+ .long 3115526047
+ .long 1072597422
+ .long 340219539
+ .long 1072594839
+ .long 2017215719
+ .long 1072592218
+ .long 3225443424
+ .long 1072589560
+ .long 3326565673
+ .long 1072586865
+ .long 1669811211
+ .long 1072584133
+ .long 1886735022
+ .long 1072581363
+ .long 3301071171
+ .long 1072578555
+ .long 928514283
+ .long 1072575710
+ .long 2656364059
+ .long 1072572826
+ .long 3473490507
+ .long 1072569904
+ .long 2649965606
+ .long 1072566944
+ .long 3736819052
+ .long 1072563945
+ .long 1680885175
+ .long 1072560908
+ .long 4413771
+ .long 1072557832
+ .long 2214869753
+ .long 1072554716
+ .long 3214725184
+ .long 1072551561
+ .long 2186079903
+ .long 1072548367
+ .long 2590372131
+ .long 1072545133
+ .long 3578146079
+ .long 1072541859
+ .long 4283712755
+ .long 1072538545
+ .long 3824834510
+ .long 1072535191
+ .long 1302400298
+ .long 1072531797
+ .long 95058636
+ .long 1072528362
+ .long 3563906063
+ .long 1072524885
+ .long 2167230730
+ .long 1072521368
+ .long 3524918334
+ .long 1072517809
+ .long 2353304918
+ .long 1072514209
+ .long 1939625839
+ .long 1072510567
+ .long 1256714581
+ .long 1072506883
+ .long 3552525848
+ .long 1072503156
+ .long 3464809522
+ .long 1072499387
+ .long 4200542593
+ .long 1072495575
+ .long 355609124
+ .long 1072491721
+ .long 3684139099
+ .long 1072487822
+ .long 148355918
+ .long 1072483881
+ .long 1457689242
+ .long 1072479895
+ .long 2118591596
+ .long 1072475865
+ .long 908848089
+ .long 1072471791
+ .long 877032689
+ .long 1072467672
+ .long 752012304
+ .long 1072463508
+ .long 3532301749
+ .long 1072459298
+ .long 3600563221
+ .long 1072455043
+ .long 3902857084
+ .long 1072450742
+ .long 3063101036
+ .long 1072446395
+ .long 3972344374
+ .long 1072442001
+ .long 903183549
+ .long 1072437561
+ .long 983892938
+ .long 1072433073
+ .long 2722858568
+ .long 1072428537
+ .long 302790515
+ .long 1072423954
+ .long 759811057
+ .long 1072419322
+ .long 2507809922
+ .long 1072414641
+ .long 2388408813
+ .long 1072407528
+ .long 2084492942
+ .long 1072397870
+ .long 2435703301
+ .long 1072388010
+ .long 1935433360
+ .long 1072377945
+ .long 2742047290
+ .long 1072367671
+ .long 2053284205
+ .long 1072357185
+ .long 657783367
+ .long 1072346483
+ .long 2893664841
+ .long 1072335560
+ .long 3718906405
+ .long 1072324413
+ .long 1547896303
+ .long 1072313038
+ .long 2494058440
+ .long 1072301429
+ .long 3133238742
+ .long 1072289582
+ .long 3327000086
+ .long 1072277492
+ .long 1860667274
+ .long 1072265154
+ .long 665340747
+ .long 1072252562
+ .long 443347841
+ .long 1072239710
+ .long 581282618
+ .long 1072226592
+ .long 3349780465
+ .long 1072213201
+ .long 914217606
+ .long 1072199532
+ .long 989797661
+ .long 1072185576
+ .long 945436416
+ .long 1072171326
+ .long 549291300
+ .long 1072156774
+ .long 1814636389
+ .long 1072141911
+ .long 239092858
+ .long 1072126729
+ .long 1794680724
+ .long 1072111217
+ .long 1241534678
+ .long 1072095366
+ .long 3366566214
+ .long 1072079164
+ .long 1244090828
+ .long 1072062601
+ .long 1708448120
+ .long 1072045663
+ .long 3544260650
+ .long 1072028337
+ .long 1402741403
+ .long 1072010610
+ .long 2551936888
+ .long 1071992465
+ .long 617669739
+ .long 1071973887
+ .long 794002186
+ .long 1071954857
+ .long 2021237693
+ .long 1071935356
+ .long 540450384
+ .long 1071915364
+ .long 1920555537
+ .long 1071894857
+ .long 2879585206
+ .long 1071873811
+ .long 3000237455
+ .long 1071852199
+ .long 3352974346
+ .long 1071829991
+ .long 569629937
+ .long 1071807155
+ .long 2077237208
+ .long 1071783653
+ .long 2284891805
+ .long 1071759446
+ .long 1226651784
+ .long 1071734489
+ .long 1102047405
+ .long 1071708731
+ .long 2009896384
+ .long 1071682115
+ .long 927419082
+ .long 1071654577
+ .long 85010366
+ .long 1071607413
+ .long 696431025
+ .long 1071548180
+ .long 2611410541
+ .long 1071486585
+ .long 2612593658
+ .long 1071422396
+ .long 3548155306
+ .long 1071355336
+ .long 3887997484
+ .long 1071285073
+ .long 244854763
+ .long 1071211202
+ .long 4214445648
+ .long 1071133216
+ .long 2303966727
+ .long 1071050478
+ .long 3991040013
+ .long 1070962152
+ .long 3126952278
+ .long 1070867118
+ .long 1817448378
+ .long 1070763804
+ .long 1793814864
+ .long 1070649884
+ .long 3507224072
+ .long 1070447193
+ .long 4027609105
+ .long 1070148772
+ .long 577507993
+ .long 1069779414
+ .long 2310232419
+ .long 1068931829
+ .type T_table,@object
+ .size T_table,2048
+ .align 16
+Tbl_addr:
+ .long 3822952792
+ .long 1021639372
+ .long 182792448
+ .long 1068507836
+ .long 2264213271
+ .long 1019558908
+ .long 649052928
+ .long 1068524253
+ .long 1797139609
+ .long 1022295143
+ .long 1243095296
+ .long 1068540671
+ .long 1415938756
+ .long 1021439537
+ .long 2033294592
+ .long 1068557090
+ .long 2356809978
+ .long 1021777916
+ .long 3088063744
+ .long 1068573510
+ .long 2669055318
+ .long 1022124482
+ .long 180888576
+ .long 1068589932
+ .long 3566445325
+ .long 1021358712
+ .long 1970196992
+ .long 1068606354
+ .long 896980323
+ .long 1021319659
+ .long 4229555456
+ .long 1068622777
+ .long 436049712
+ .long 1021319758
+ .long 2732572160
+ .long 1068639202
+ .long 583123209
+ .long 1020797960
+ .long 1842831872
+ .long 1068655628
+ .long 1370449804
+ .long 1021429270
+ .long 1628994560
+ .long 1068672055
+ .long 2411391464
+ .long 1021057980
+ .long 2159763712
+ .long 1068688483
+ .long 1208692749
+ .long 1021943903
+ .long 3503886336
+ .long 1068704912
+ .long 538793309
+ .long 1019744063
+ .long 1435187200
+ .long 1068721343
+ .long 4085087612
+ .long 1020608419
+ .long 317469952
+ .long 1068737775
+ .long 144386942
+ .long 1021440732
+ .long 219617280
+ .long 1068754208
+ .long 2940088361
+ .long 1019981122
+ .long 1210558208
+ .long 1068770642
+ .long 2176850347
+ .long 1018373705
+ .long 3359268352
+ .long 1068787077
+ .long 2395611454
+ .long 1021889042
+ .long 2439803648
+ .long 1068803514
+ .long 1650705253
+ .long 1020227966
+ .long 2816203520
+ .long 1068819952
+ .long 3702166386
+ .long 1019379914
+ .long 262620672
+ .long 1068836392
+ .long 1855649370
+ .long 1020453124
+ .long 3438159616
+ .long 1068852832
+ .long 923063860
+ .long 1019273834
+ .long 3822105856
+ .long 1068869274
+ .long 4289947947
+ .long 1019434249
+ .long 1483729920
+ .long 1068885718
+ .long 787455814
+ .long 1020738379
+ .long 787321088
+ .long 1068902163
+ .long 3321653337
+ .long 1021842569
+ .long 1802253312
+ .long 1068918609
+ .long 2653633526
+ .long 1021821525
+ .long 302985984
+ .long 1068935057
+ .long 161272028
+ .long 1021655149
+ .long 653966080
+ .long 1068951506
+ .long 2566098667
+ .long 1020066219
+ .long 2924727296
+ .long 1068967956
+ .long 3646493722
+ .long 1014292285
+ .long 2889890304
+ .long 1068984408
+ .long 1081009196
+ .long 1022189620
+ .long 619098112
+ .long 1069000862
+ .long 4011643355
+ .long 1021773297
+ .long 477017600
+ .long 1069017317
+ .long 4030305534
+ .long 1021292252
+ .long 2533403904
+ .long 1069033773
+ .long 2645187591
+ .long 1019527099
+ .long 2563102208
+ .long 1069050231
+ .long 3857293792
+ .long 1022311697
+ .long 635982336
+ .long 1069066691
+ .long 3625936637
+ .long 1017511744
+ .long 1116940800
+ .long 1069083152
+ .long 3653872993
+ .long 1022016631
+ .long 4075964160
+ .long 1069099614
+ .long 2468900271
+ .long 1021769532
+ .long 993165568
+ .long 1069116079
+ .long 1358104224
+ .long 1021199776
+ .long 528586752
+ .long 1069132545
+ .long 2200950332
+ .long 1022024872
+ .long 2752395776
+ .long 1069149012
+ .long 3197072454
+ .long 1017751319
+ .long 3439855616
+ .long 1069165481
+ .long 1651081806
+ .long 1020809338
+ .long 2661257728
+ .long 1069181952
+ .long 539032752
+ .long 1021728805
+ .long 486957312
+ .long 1069198425
+ .long 3136045149
+ .long 1016888671
+ .long 1282340352
+ .long 1069214899
+ .long 2593963259
+ .long 1018956103
+ .long 822921728
+ .long 1069231375
+ .long 2146032737
+ .long 1022306465
+ .long 3474216192
+ .long 1069247852
+ .long 3976811625
+ .long 1021350207
+ .long 716902656
+ .long 1069264332
+ .long 718267222
+ .long 1018624727
+ .long 1211594496
+ .long 1069280813
+ .long 1485641389
+ .long 1018447451
+ .long 734070272
+ .long 1069297296
+ .long 354455128
+ .long 1021341291
+ .long 3650110720
+ .long 1069313780
+ .long 682185947
+ .long 1021651853
+ .long 1440663040
+ .long 1069330267
+ .long 3558574550
+ .long 1021615110
+ .long 2766612224
+ .long 1069346755
+ .long 874607978
+ .long 1017746872
+ .long 3404011008
+ .long 1069363245
+ .long 4154988502
+ .long 1021439906
+ .long 3423949056
+ .long 1069379737
+ .long 2263202309
+ .long 1021479615
+ .long 2897587712
+ .long 1069396231
+ .long 2562065031
+ .long 1022090363
+ .long 1896159232
+ .long 1069412727
+ .long 3836237663
+ .long 1019867288
+ .long 490968576
+ .long 1069429225
+ .long 3322056743
+ .long 1006752762
+ .long 3048360192
+ .long 1069445724
+ .long 1152314833
+ .long 1013122252
+ .long 1049850624
+ .long 1069462226
+ .long 3601590727
+ .long 1022214610
+ .long 3156899584
+ .long 1069478729
+ .long 1855169970
+ .long 1019487271
+ .long 851173376
+ .long 1069495235
+ .long 312649594
+ .long 1020868604
+ .long 2794281728
+ .long 1069511742
+ .long 1093490181
+ .long 1020777577
+ .long 468042496
+ .long 1069528252
+ .long 1152540679
+ .long 1021403732
+ .long 2534219264
+ .long 1069544763
+ .long 2292126035
+ .long 1021872430
+ .long 1376146432
+ .long 1069558527
+ .long 3293753641
+ .long 1020500454
+ .long 4175442432
+ .long 1069575044
+ .long 3626347564
+ .long 1021610969
+ .long 3523113472
+ .long 1069591566
+ .long 339956500
+ .long 1021119039
+ .long 4003350528
+ .long 1069608092
+ .long 3429333082
+ .long 1022813542
+ .long 1611067392
+ .long 1069624623
+ .long 2298017544
+ .long 1021977587
+ .long 931782144
+ .long 1069641158
+ .long 2164684743
+ .long 1021250988
+ .long 2256725504
+ .long 1069657697
+ .long 1138762335
+ .long 1021443776
+ .long 1582853120
+ .long 1069674241
+ .long 1084010382
+ .long 1022994693
+ .long 3497758720
+ .long 1069690789
+ .long 406366244
+ .long 1022713586
+ .long 3999816960
+ .long 1069707342
+ .long 1488723042
+ .long 1023381290
+ .long 3383096064
+ .long 1069723900
+ .long 2541558953
+ .long 1019137887
+ .long 1942403584
+ .long 1069740463
+ .long 1879620343
+ .long 1022653642
+ .long 4268263680
+ .long 1069757030
+ .long 3039077047
+ .long 1022252545
+ .long 2067062272
+ .long 1069773603
+ .long 4190670677
+ .long 1020725863
+ .long 4225828096
+ .long 1069790180
+ .long 1998567321
+ .long 1022014385
+ .long 2452507136
+ .long 1069806763
+ .long 1511628873
+ .long 1021900300
+ .long 1340746240
+ .long 1069823351
+ .long 788367341
+ .long 1022726208
+ .long 1190035456
+ .long 1069839944
+ .long 3856337230
+ .long 1021834118
+ .long 2300688384
+ .long 1069856542
+ .long 3211396579
+ .long 1022621365
+ .long 678886400
+ .long 1069873146
+ .long 4001011887
+ .long 1022042646
+ .long 921594112
+ .long 1069889755
+ .long 557811968
+ .long 1023065533
+ .long 3331668992
+ .long 1069906369
+ .long 1877060679
+ .long 1022419742
+ .long 3917875200
+ .long 1069922989
+ .long 1181055171
+ .long 1022752712
+ .long 2984829696
+ .long 1069939615
+ .long 4294526932
+ .long 1021499988
+ .long 838049024
+ .long 1069956247
+ .long 3658081878
+ .long 1022957952
+ .long 2078928384
+ .long 1069972884
+ .long 820353701
+ .long 1019391107
+ .long 2719854336
+ .long 1069989527
+ .long 1644022489
+ .long 1023378240
+ .long 3069117696
+ .long 1070006176
+ .long 2771393702
+ .long 1019319954
+ .long 3435962368
+ .long 1070022831
+ .long 3876394145
+ .long 1023024433
+ .long 4130595328
+ .long 1070039492
+ .long 1630447748
+ .long 1021465882
+ .long 1169236224
+ .long 1070056160
+ .long 2828355997
+ .long 1020458120
+ .long 3453997312
+ .long 1070072833
+ .long 164091641
+ .long 1020388279
+ .long 2708127744
+ .long 1070089513
+ .long 3036550223
+ .long 1023328684
+ .long 3540797696
+ .long 1070106199
+ .long 3710949463
+ .long 1022568805
+ .long 1972276736
+ .long 1070122892
+ .long 3885277950
+ .long 1019761674
+ .long 2613815552
+ .long 1070139591
+ .long 2764165077
+ .long 1022921023
+ .long 1487791616
+ .long 1070156297
+ .long 1330644769
+ .long 1023162679
+ .long 3207593472
+ .long 1070173009
+ .long 3911007221
+ .long 1022993496
+ .long 3797764608
+ .long 1070189728
+ .long 979712598
+ .long 1022554580
+ .long 3578920448
+ .long 1070206454
+ .long 2825738223
+ .long 1020223708
+ .long 2872795648
+ .long 1070223187
+ .long 392451124
+ .long 1022666279
+ .long 2002258432
+ .long 1070239927
+ .long 3730407632
+ .long 1023148291
+ .long 1291326464
+ .long 1070256674
+ .long 3723802980
+ .long 1022514089
+ .long 1065180928
+ .long 1070273428
+ .long 2635617463
+ .long 1022654470
+ .long 1650181632
+ .long 1070290189
+ .long 2061982883
+ .long 1022853411
+ .long 3373882880
+ .long 1070306957
+ .long 319732785
+ .long 1022017175
+ .long 2270081280
+ .long 1070323733
+ .long 2237757411
+ .long 1023064087
+ .long 2963732736
+ .long 1070340516
+ .long 468839165
+ .long 1023293774
+ .long 1491099904
+ .long 1070357307
+ .long 1502657946
+ .long 1021533479
+ .long 2479636480
+ .long 1070374105
+ .long 482913562
+ .long 1021986286
+ .long 1968133632
+ .long 1070390911
+ .long 3281474337
+ .long 1022646400
+ .long 291639040
+ .long 1070407725
+ .long 2453320259
+ .long 1022812423
+ .long 2081472512
+ .long 1070424546
+ .long 2939989570
+ .long 1023091888
+ .long 3380340480
+ .long 1070441375
+ .long 2850707499
+ .long 1021921109
+ .long 232287488
+ .long 1070458213
+ .long 3674625342
+ .long 1020725130
+ .long 1567614208
+ .long 1070475058
+ .long 9347334
+ .long 1022024009
+ .long 3433091072
+ .long 1070491911
+ .long 282524999
+ .long 1021433523
+ .long 1876877312
+ .long 1070508773
+ .long 3470449440
+ .long 1019309721
+ .long 1538472192
+ .long 1070525643
+ .long 2089486825
+ .long 1019698916
+ .long 2763830784
+ .long 1070542521
+ .long 443498115
+ .long 1020505194
+ .long 1605381632
+ .long 1070559408
+ .long 3018871601
+ .long 1022869913
+ .long 2706946048
+ .long 1070576303
+ .long 3936260892
+ .long 1023175875
+ .long 2123887360
+ .long 1070593207
+ .long 2994220655
+ .long 1022825948
+ .long 104015104
+ .long 1070603108
+ .long 335054493
+ .long 1023441853
+ .long 2904568832
+ .long 1070615800
+ .long 1451215633
+ .long 1023853857
+ .long 3456197120
+ .long 1070632739
+ .long 436334733
+ .long 1024026432
+ .long 252452352
+ .long 1070649697
+ .long 34596167
+ .long 1024031396
+ .long 3328018432
+ .long 1070666672
+ .long 2644547073
+ .long 1024296758
+ .long 1255829248
+ .long 1070683667
+ .long 552832586
+ .long 1023763122
+ .long 4097058560
+ .long 1070700680
+ .long 1955640623
+ .long 1021394654
+ .long 451770112
+ .long 1070717714
+ .long 3428903777
+ .long 1022941142
+ .long 408920832
+ .long 1070734767
+ .long 165503263
+ .long 1023894958
+ .long 1186960640
+ .long 1070751840
+ .long 435826450
+ .long 1024026134
+ .long 19078656
+ .long 1070768934
+ .long 1834169749
+ .long 1022899284
+ .long 2743490304
+ .long 1070786048
+ .long 494581074
+ .long 1018818479
+ .long 2328961024
+ .long 1070803184
+ .long 2987908834
+ .long 1022581110
+ .long 350011392
+ .long 1070820342
+ .long 240771184
+ .long 1024143083
+ .long 2692326912
+ .long 1070837521
+ .long 666056837
+ .long 1022394776
+ .long 2373274368
+ .long 1070854723
+ .long 2484337770
+ .long 1024228156
+ .long 1017131520
+ .long 1070871948
+ .long 3285648279
+ .long 1024025789
+ .long 265558272
+ .long 1070889196
+ .long 392241896
+ .long 1024252809
+ .long 1778008064
+ .long 1070906467
+ .long 1536107943
+ .long 1023949300
+ .long 2937184768
+ .long 1070923762
+ .long 3541062251
+ .long 1019448646
+ .long 1144442880
+ .long 1070941082
+ .long 3691683781
+ .long 1022123948
+ .long 2410165504
+ .long 1070958426
+ .long 1804181960
+ .long 1023945221
+ .long 4174350848
+ .long 1070975795
+ .long 2016094861
+ .long 1021716585
+ .long 3897012480
+ .long 1070993190
+ .long 175294410
+ .long 1023703404
+ .long 3353623040
+ .long 1071010611
+ .long 167973242
+ .long 1023240839
+ .long 45671168
+ .long 1071028059
+ .long 2166856113
+ .long 1021565413
+ .long 86063872
+ .long 1071045533
+ .long 2676254727
+ .long 1023985299
+ .long 1019772672
+ .long 1071063034
+ .long 989043593
+ .long 1021549587
+ .long 414297344
+ .long 1071080563
+ .long 3960972046
+ .long 1024307251
+ .long 155173120
+ .long 1071098120
+ .long 1830919291
+ .long 1021592251
+ .long 2151562240
+ .long 1071115705
+ .long 405408666
+ .long 1023423128
+ .long 4041854720
+ .long 1071133319
+ .long 2043497827
+ .long 1024411503
+ .long 3489224192
+ .long 1071150963
+ .long 3072215864
+ .long 1022698635
+ .long 2477196288
+ .long 1071168637
+ .long 1812195139
+ .long 1022689192
+ .long 3015298816
+ .long 1071186341
+ .long 764841969
+ .long 1021027331
+ .long 2844731136
+ .long 1071204076
+ .long 2878117321
+ .long 1019116513
+ .long 4028950528
+ .long 1071221842
+ .long 698911452
+ .long 1023265602
+ .long 69441536
+ .long 1071239641
+ .long 3253467847
+ .long 1020795075
+ .long 1676209920
+ .long 1071257471
+ .long 4272431167
+ .long 1022873982
+ .long 2408752384
+ .long 1071275334
+ .long 648519100
+ .long 1024385717
+ .long 151623680
+ .long 1071293231
+ .long 345257017
+ .long 1019561408
+ .long 1410154240
+ .long 1071311161
+ .long 197863993
+ .long 1023224207
+ .long 4131351552
+ .long 1071329125
+ .long 2620801789
+ .long 1024411169
+ .long 1999664384
+ .long 1071347125
+ .long 3952692616
+ .long 1024168086
+ .long 1617668864
+ .long 1071365160
+ .long 3019889809
+ .long 1021907692
+ .long 1032074240
+ .long 1071383231
+ .long 59469899
+ .long 1023656194
+ .long 2619492096
+ .long 1071401338
+ .long 1417526820
+ .long 1021457783
+ .long 202429440
+ .long 1071419483
+ .long 2927667935
+ .long 1019175447
+ .long 525044224
+ .long 1071437665
+ .long 38166811
+ .long 1023981879
+ .long 1779258880
+ .long 1071455885
+ .long 481252500
+ .long 1023310234
+ .long 2195673600
+ .long 1071474144
+ .long 3962395981
+ .long 1021339088
+ .long 44573696
+ .long 1071492443
+ .long 3936281395
+ .long 1023014829
+ .long 2226905344
+ .long 1071510781
+ .long 1515320476
+ .long 1024320623
+ .long 2800512512
+ .long 1071529160
+ .long 1225403697
+ .long 1021081846
+ .long 161113600
+ .long 1071547581
+ .long 3064809733
+ .long 1024173917
+ .long 1338410240
+ .long 1071566043
+ .long 2027604973
+ .long 1024362526
+ .long 522433280
+ .long 1071584548
+ .long 2055171723
+ .long 1023858825
+ .long 539595776
+ .long 1071603096
+ .long 3868820135
+ .long 1022936424
+ .long 4264017664
+ .long 1071621687
+ .long 3228065145
+ .long 1023479578
+ .long 1733924096
+ .long 1071640324
+ .long 3511934475
+ .long 1022496355
+ .long 108880384
+ .long 1071651839
+ .long 615880967
+ .long 1023519706
+ .long 3517856512
+ .long 1071661202
+ .long 3113108559
+ .long 1025190289
+ .long 4043153152
+ .long 1071670589
+ .long 1571836218
+ .long 1023106116
+ .long 3251299072
+ .long 1071680000
+ .long 3444076102
+ .long 1022187841
+ .long 2736921600
+ .long 1071689435
+ .long 272771483
+ .long 1025095280
+ .long 3897698560
+ .long 1071703633
+ .long 2075390188
+ .long 1022489022
+ .long 3209485056
+ .long 1071722652
+ .long 1438094065
+ .long 1021844944
+ .long 3781432064
+ .long 1071741774
+ .long 1675017145
+ .long 1024143828
+ .long 2684184064
+ .long 1071761003
+ .long 2259963753
+ .long 1024731393
+ .long 1840489728
+ .long 1071780342
+ .long 3372883597
+ .long 1023431408
+ .long 3764087808
+ .long 1071799794
+ .long 3307523102
+ .long 1024485788
+ .long 3006232320
+ .long 1071819364
+ .long 3088971966
+ .long 1025213251
+ .long 3374881280
+ .long 1071839055
+ .long 834437749
+ .long 1025236452
+ .long 797284864
+ .long 1071858872
+ .long 3122663941
+ .long 1025320473
+ .long 545765120
+ .long 1071878818
+ .long 826539625
+ .long 1022450955
+ .long 107562240
+ .long 1071898898
+ .long 339584600
+ .long 1022481255
+ .long 2123649024
+ .long 1071919116
+ .long 3912959833
+ .long 1024321009
+ .long 1562385664
+ .long 1071939478
+ .long 2846067230
+ .long 1023343981
+ .long 2963085824
+ .long 1071959988
+ .long 954548627
+ .long 1021475211
+ .long 3325550592
+ .long 1071980652
+ .long 3459651155
+ .long 1025305573
+ .long 775752448
+ .long 1072001476
+ .long 3582746667
+ .long 1023859460
+ .long 3238590720
+ .long 1072022464
+ .long 634636162
+ .long 1024472353
+ .long 2758801920
+ .long 1072043624
+ .long 3078216319
+ .long 1025304516
+ .long 1370319104
+ .long 1072064962
+ .long 2570569078
+ .long 1025099442
+ .long 2615805184
+ .long 1072086484
+ .long 3729933412
+ .long 1024605112
+ .long 3077336576
+ .long 1072108198
+ .long 1948916066
+ .long 1024781603
+ .long 1099528192
+ .long 1072130112
+ .long 3139143157
+ .long 1023729360
+ .long 1231903232
+ .long 1072152233
+ .long 1349513477
+ .long 1024737515
+ .long 1507504128
+ .long 1072174570
+ .long 3484516322
+ .long 1024000959
+ .long 2214659840
+ .long 1072197132
+ .long 2563820917
+ .long 1025225535
+ .long 1804739840
+ .long 1072219929
+ .long 760038746
+ .long 1024482855
+ .long 1413746688
+ .long 1072242971
+ .long 3401734714
+ .long 1025129838
+ .long 821409536
+ .long 1072266269
+ .long 3729772551
+ .long 1025484796
+ .long 3031825664
+ .long 1072289834
+ .long 122256749
+ .long 1024752594
+ .long 1710784256
+ .long 1072313680
+ .long 1518205483
+ .long 1024724809
+ .long 3025265152
+ .long 1072337819
+ .long 409951989
+ .long 1022835555
+ .long 287769088
+ .long 1072362267
+ .long 800355594
+ .long 1022484850
+ .long 198179840
+ .long 1072387038
+ .long 3502926213
+ .long 1024209373
+ .long 1909130496
+ .long 1072412149
+ .long 3064694319
+ .long 1025380823
+ .long 1941732096
+ .long 1072437619
+ .long 4112930390
+ .long 1024294679
+ .long 3492010496
+ .long 1072463467
+ .long 2684918107
+ .long 1023220233
+ .long 81959680
+ .long 1072489716
+ .long 220021366
+ .long 1020635131
+ .long 2297837056
+ .long 1072516387
+ .long 4027683826
+ .long 1021041185
+ .long 270404096
+ .long 1072543508
+ .long 2012766065
+ .long 1021780753
+ .long 3667376896
+ .long 1072571105
+ .long 2727981522
+ .long 1023009874
+ .long 330400256
+ .long 1072599212
+ .long 2940017003
+ .long 1025393439
+ .long 1119293952
+ .long 1072627861
+ .long 1608550416
+ .long 1022675612
+ .long 3536155904
+ .long 1072657091
+ .long 349665778
+ .long 1025156751
+ .long 3078046720
+ .long 1072686946
+ .long 2016159996
+ .long 1022193169
+ .long 455228416
+ .long 1072705361
+ .long 1908539328
+ .long 1026126332
+ .long 1871505664
+ .long 1072720988
+ .long 2784700894
+ .long 1025922277
+ .long 1630994432
+ .long 1072737010
+ .long 361107678
+ .long 1022887244
+ .long 2084558336
+ .long 1072753462
+ .type Tbl_addr,@object
+ .size Tbl_addr,3840
+ .space 768, 0x00 # pad
+ .align 16
+SIGNMASK:
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .type SIGNMASK,@object
+ .size SIGNMASK,16
+ .align 16
+HALFMASK2:
+ .long 0
+ .long 2147483584
+ .long 0
+ .long 0
+ .type HALFMASK2,@object
+ .size HALFMASK2,16
+ .align 16
+PI_BY_2:
+ .long 856972295
+ .long 1016178214
+ .long 1413754136
+ .long 1073291771
+ .type PI_BY_2,@object
+ .size PI_BY_2,16
+ .align 16
+cv2:
+ .long 780903145
+ .long 1066854586
+ .long 858993459
+ .long 1068708659
+ .long 3340530119
+ .long 1067392113
+ .long 1431655765
+ .long 1069897045
+ .long 1321528399
+ .long 1066517740
+ .long 3067833783
+ .long 1067899757
+ .long 2021159460
+ .long 1065855096
+ .long 2576980378
+ .long 1066178969
+ .type cv2,@object
+ .size cv2,64
+ .align 16
+HALFMASK:
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .type HALFMASK,@object
+ .size HALFMASK,16
+ .align 4
+ONEMASK:
+ .long 0
+ .long 1072693248
+ .type ONEMASK,@object
+ .size ONEMASK,8
+ .align 4
+TMASK:
+ .long 0
+ .long 4294950912
+ .type TMASK,@object
+ .size TMASK,8
+ .align 4
+cv:
+ .long 1431655765
+ .long 1069897045
+ .long 858993459
+ .long 1068708659
+ .long 3067833783
+ .long 1067899757
+ .type cv,@object
+ .size cv,24
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_asin.1-.
+ .4byte ..___tag_value_asin.5-..___tag_value_asin.1
+ .2byte 0x0400
+ .4byte ..___tag_value_asin.3-..___tag_value_asin.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_asin.4-..___tag_value_asin.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_atan2.S b/libm/x86_64/e_atan2.S
new file mode 100644
index 0000000..f9baea9
--- /dev/null
+++ b/libm/x86_64/e_atan2.S
@@ -0,0 +1,1242 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+//
+//1. The method is based on the relationship of atan2(Y,X) to atan(|Y/X|)
+// as follows.
+// / sign(Y) atan(|Y/X|) if X > 0
+// atan2(Y,X) =
+// \ sign(Y)*pi - sign(Y)*atan(|Y/X|) if X < 0
+//
+// Thus, atan2(Y,X) is of the form atan2(Y,X) = PI + sgn*atan(|Y/X|)
+// where PI and sgn can be determined by the four possible combinations of
+// of the pair (sign(X),sign(Y)). We concentrate on the numerical method
+// for atan(|Y/X|).
+//
+//2. For |Y/X| < 2^(-64), atan(|Y/X|) ~=~ |Y/X|. Hence, atan2(Y,X) is Y/X
+// if X > 0, and sign(Y)*pi otherwise.
+//3. For |Y/X| >= 2^(65), atan(|Y/X|) ~=~ pi/2. Hence atan2(Y,X) is sign(Y)pi/2.
+//4. For 2^(-64) <= |Y/X| < 2^(-5), atan(|Y/X|) is approximated by a polynomial
+// of the form Z + Z*E*polynomial(E), where Z = |Y/X| and E = Z*Z.
+//5. For |Y/X| > 2^(5), atan(|Y/X|) = pi/2 + atan(-|X/Y|), and atan(-|X/Y|) is
+// calculated using the polynomial in 4 above.
+//6. For 2^(-5) <= |Y/X| <= 2^(5), we employ a table lookup method. First,
+// we obtain B = 2^k * 1.b1 b2 b3 b4 = 2^k * (1+k/16) that approximate
+// |Y/X| to approximately 5 significant bits. Hence, atan(|Y/X|) is
+//
+// atan(|Y/X|) = atan(B) + atan(Z), where Z = (|Y|-B|X|)/(|X|+B|Y|).
+// ~=~ tau + Z + Z*E*polynomial(E), where E = Z*Z.
+//
+// B has the range from 2^(-6)*(1+14/16) to 2^5 = 2^(5)*(1+0/16), totally
+// 163 possible values. These values are calculated beforehand and stored
+// in a table. The polynomial is the one used in 4.
+//
+// Special cases:
+// atan2(+-0, +0) = +-0
+// atan2(+-0, -0) = +-pi
+// atan2(+-0, x) = +-0, for x > 0, and +-pi, for x < 0
+// atan2(y, +-0) = +pi/2 for y > 0, and -pi/2 for y < 0
+// atan2(+-y, +INF) = +-0, for finite y > 0
+// atan2(+-y, -INF) = +-pi, for finite y > 0
+// atan2(+-INF, x) = +-pi/2, for finite x
+// atan2(+-INF, +INF) = +-pi/4
+// atan2(+-INF, -INF) = +-3*pi/4
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin atan2
+ENTRY(atan2)
+# parameter 1: %xmm0
+# parameter 2: %xmm1
+..B1.1:
+..___tag_value_atan2.1:
+ subq $24, %rsp
+..___tag_value_atan2.3:
+ movsd %xmm0, (%rsp)
+ movsd %xmm1, 8(%rsp)
+..B1.2:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ subl $14448, %eax
+ cmpl $3840, %eax
+ ja .L_2TAG_PACKET_0.0.2
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ subl $14448, %eax
+ cmpl $3840, %eax
+ ja .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ unpcklpd %xmm1, %xmm0
+ xorpd %xmm5, %xmm5
+ xorpd %xmm3, %xmm3
+ movl $2048, %eax
+ pinsrw $3, %eax, %xmm5
+ paddw %xmm1, %xmm5
+ psrlq $29, %xmm5
+ rcpss %xmm5, %xmm3
+ xorpd %xmm4, %xmm4
+ movl $14336, %ecx
+ pinsrw $3, %ecx, %xmm4
+ psllq $29, %xmm3
+ paddw %xmm4, %xmm3
+ mulsd %xmm0, %xmm3
+ xorpd %xmm2, %xmm2
+ xorpd %xmm6, %xmm6
+ xorpd %xmm7, %xmm7
+ movl $32768, %eax
+ pinsrw $2, %eax, %xmm6
+ movl $32767, %ecx
+ pinsrw $3, %ecx, %xmm7
+ paddd %xmm6, %xmm3
+ andpd %xmm7, %xmm3
+ movq %xmm3, %xmm5
+ pextrw $3, %xmm3, %eax
+ movl $16448, %ecx
+ pinsrw $3, %ecx, %xmm2
+ minsd %xmm2, %xmm3
+ movmskpd %xmm0, %edx
+ psllq $1, %xmm0
+ psrlq $1, %xmm0
+ cmpsd $2, %xmm2, %xmm5
+ psllq $1, %xmm1
+ psrlq $1, %xmm1
+ movq %xmm1, %xmm6
+ movq %xmm1, %xmm7
+ movq %xmm0, %xmm2
+ movl $0, %ecx
+ pinsrw $0, %ecx, %xmm6
+ subsd %xmm6, %xmm7
+ movq %xmm0, %xmm4
+ mulsd %xmm3, %xmm6
+ mulsd %xmm3, %xmm4
+ mulsd %xmm3, %xmm7
+ andpd %xmm5, %xmm0
+ subsd %xmm6, %xmm0
+ andpd %xmm5, %xmm1
+ addsd %xmm1, %xmm4
+ subsd %xmm7, %xmm0
+ andl $32752, %eax
+ subl $16286, %eax
+ cmpl $1121, %eax
+ ja .L_2TAG_PACKET_3.0.2
+ divsd %xmm4, %xmm0
+ pextrw $3, %xmm3, %ecx
+ movsd a2(%rip), %xmm2
+ movsd b2(%rip), %xmm3
+ pextrw $0, %xmm5, %eax
+ addl %edx, %edx
+ lea P_TBL(%rip), %r8
+ movapd (%r8,%rdx,8), %xmm6
+ lea SGN_TBL(%rip), %r8
+ movapd (%r8,%rdx,8), %xmm1
+ subl $16286, %ecx
+ notl %eax
+ andl $1, %eax
+ addl %eax, %ecx
+ addl %ecx, %ecx
+ lea ATAN_TBL(%rip), %r8
+ movapd (%r8,%rcx,8), %xmm5
+ xorpd %xmm1, %xmm5
+ addpd %xmm6, %xmm5
+ movq %xmm5, %xmm6
+ unpckhpd %xmm5, %xmm5
+ xorpd %xmm0, %xmm1
+ movq %xmm1, %xmm4
+ mulsd %xmm0, %xmm0
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm3
+ addsd %xmm6, %xmm1
+ subsd %xmm1, %xmm6
+ addsd %xmm4, %xmm6
+ addsd 8+a2(%rip), %xmm2
+ mulsd %xmm0, %xmm3
+ mulsd %xmm4, %xmm0
+ addsd %xmm5, %xmm6
+ mulsd %xmm2, %xmm0
+ addsd 8+b2(%rip), %xmm3
+ mulsd %xmm3, %xmm0
+ addsd %xmm6, %xmm0
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_3.0.2:
+ addl $942, %eax
+ cmpl $942, %eax
+ ja .L_2TAG_PACKET_4.0.2
+ xorpd %xmm4, %xmm4
+ movl $16368, %ecx
+ pinsrw $3, %ecx, %xmm4
+ divsd %xmm1, %xmm4
+ addl %edx, %edx
+ lea SGN_TBL(%rip), %r8
+ movapd (%r8,%rdx,8), %xmm6
+ unpcklpd %xmm3, %xmm3
+ xorpd %xmm6, %xmm0
+ xorpd %xmm6, %xmm2
+ xorpd %xmm6, %xmm3
+ lea P_TBL2(%rip), %r8
+ movapd (%r8,%rdx,8), %xmm7
+ movsd a2(%rip), %xmm1
+ movsd b2(%rip), %xmm5
+ lea SELECT_B(%rip), %r8
+ andpd (%r8,%rdx,8), %xmm3
+ mulsd %xmm4, %xmm2
+ mulsd %xmm4, %xmm0
+ movq %xmm2, %xmm6
+ mulsd %xmm2, %xmm2
+ mulsd %xmm2, %xmm1
+ addsd %xmm2, %xmm5
+ mulsd %xmm2, %xmm6
+ addsd 8+a2(%rip), %xmm1
+ mulsd %xmm2, %xmm5
+ addsd %xmm0, %xmm7
+ addpd %xmm3, %xmm7
+ mulsd %xmm6, %xmm1
+ addsd 8+b2(%rip), %xmm5
+ mulsd %xmm1, %xmm5
+ addsd %xmm7, %xmm5
+ pshufd $238, %xmm7, %xmm0
+ addsd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ movsd 8(%rsp), %xmm1
+ movsd (%rsp), %xmm0
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl %eax, %ecx
+ jg .L_2TAG_PACKET_5.0.2
+ pextrw $3, %xmm1, %ecx
+ cmpl $32767, %ecx
+ jg .L_2TAG_PACKET_6.0.2
+ divsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ andpd SGNMASK(%rip), %xmm0
+ movsd pi_table(%rip), %xmm2
+ xorpd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_5.0.2:
+ andpd SGNMASK(%rip), %xmm0
+ movsd pi2_table(%rip), %xmm2
+ xorpd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+.L_2TAG_PACKET_1.0.2:
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_7.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_8.0.2
+ movsd POW55(%rip), %xmm3
+ movl $1024, %edx
+ movsd INVEXPMASK(%rip), %xmm4
+ xorpd %xmm6, %xmm6
+ movsd EXPMASK(%rip), %xmm7
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_10.0.2:
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_11.0.2
+.L_2TAG_PACKET_12.0.2:
+ addl %ecx, %edx
+ subl %eax, %edx
+ cmpl $2048, %edx
+ ja .L_2TAG_PACKET_4.0.2
+ addl $15344, %edx
+ pinsrw $3, %edx, %xmm6
+ andpd %xmm4, %xmm0
+ andpd %xmm4, %xmm1
+ orpd %xmm6, %xmm0
+ orpd %xmm7, %xmm1
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_9.0.2:
+ subl $880, %edx
+ mulsd %xmm3, %xmm0
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_13.0.2
+ jmp .L_2TAG_PACKET_10.0.2
+.L_2TAG_PACKET_11.0.2:
+ addl $880, %edx
+ mulsd %xmm3, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_14.0.2
+ jmp .L_2TAG_PACKET_12.0.2
+.L_2TAG_PACKET_7.0.2:
+ movd %xmm0, %edx
+ movq %xmm0, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ andl $1048575, %ecx
+ orl %edx, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_15.0.2
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ cmpl $32752, %eax
+ jae .L_2TAG_PACKET_16.0.2
+ movapd pi2_table(%rip), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_15.0.2:
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_16.0.2:
+ movd %xmm1, %eax
+ movq %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ movl $-2147483648, %edx
+ andl %ecx, %edx
+ andl $1048575, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_17.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_18.0.2
+ movapd pi4_table(%rip), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_17.0.2:
+ movq %xmm1, %xmm0
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_18.0.2:
+ movapd pi4_table(%rip), %xmm5
+ movapd pi2_table(%rip), %xmm6
+ addpd %xmm6, %xmm5
+ pshufd $238, %xmm5, %xmm6
+ addpd %xmm6, %xmm5
+ orpd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_8.0.2:
+ movd %xmm1, %eax
+ movq %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ movl $-2147483648, %edx
+ andl %ecx, %edx
+ andl $1048575, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ jne .L_2TAG_PACKET_17.0.2
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_19.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_19.0.2:
+ movapd pi_table(%rip), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_13.0.2:
+ pextrw $3, %xmm1, %edx
+ andl $32768, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_20.0.2
+ movapd pi_table(%rip), %xmm5
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ comisd %xmm0, %xmm1
+ orpd %xmm5, %xmm0
+ je .L_2TAG_PACKET_21.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_20.0.2:
+ comisd %xmm0, %xmm1
+ je .L_2TAG_PACKET_21.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_14.0.2:
+ movapd pi2_table(%rip), %xmm5
+ psrlq $63, %xmm0
+ psllq $63, %xmm0
+ pshufd $238, %xmm5, %xmm4
+ addsd %xmm4, %xmm5
+ orpd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_21.0.2:
+ movq %xmm0, 16(%rsp)
+..B1.3:
+ movq 16(%rsp), %xmm0
+.L_2TAG_PACKET_22.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_atan2.4:
+ ret
+..___tag_value_atan2.5:
+END(atan2)
+# -- End atan2
+ .section .rodata, "a"
+ .align 16
+ .align 16
+a2:
+ .long 2006262985
+ .long 1069310863
+ .long 2358449471
+ .long 3217342131
+ .type a2,@object
+ .size a2,16
+ .align 16
+b2:
+ .long 3845454352
+ .long 1069952297
+ .long 2829679149
+ .long 1073771565
+ .type b2,@object
+ .size b2,16
+ .align 16
+P_TBL:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 3221823995
+ .long 856972295
+ .long 3164710438
+ .type P_TBL,@object
+ .size P_TBL,64
+ .align 16
+SGN_TBL:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .type SGN_TBL,@object
+ .size SGN_TBL,64
+ .align 16
+ATAN_TBL:
+ .long 3390881280
+ .long 1067318733
+ .long 1411116779
+ .long 1018950063
+ .long 2985987840
+ .long 1067384211
+ .long 2088903695
+ .long 1018086027
+ .long 3148445184
+ .long 1067449685
+ .long 2044163806
+ .long 1017271335
+ .long 3667629184
+ .long 1067515494
+ .long 2353092775
+ .long 1019967309
+ .long 1546568832
+ .long 1067580954
+ .long 611991315
+ .long 1017602584
+ .long 3815996800
+ .long 1067646404
+ .long 466038598
+ .long 1019686426
+ .long 4050241920
+ .long 1067711845
+ .long 3265026328
+ .long 1019626952
+ .long 120454912
+ .long 1067777277
+ .long 1542207696
+ .long 1020155608
+ .long 2784639744
+ .long 1067842697
+ .long 3883834623
+ .long 1018602870
+ .long 1328010624
+ .long 1067908107
+ .long 1791097456
+ .long 1019053126
+ .long 2217794048
+ .long 1067973505
+ .long 551619938
+ .long 1018494194
+ .long 3333520000
+ .long 1068038891
+ .long 2390331823
+ .long 1019033022
+ .long 2557052032
+ .long 1068104265
+ .long 2423976108
+ .long 1019728674
+ .long 2067649536
+ .long 1068169626
+ .long 3757397745
+ .long 1018672362
+ .long 4047094784
+ .long 1068234973
+ .long 481613184
+ .long 1019275104
+ .long 2089853184
+ .long 1068300307
+ .long 1733914374
+ .long 1020124677
+ .long 2678003840
+ .long 1068365626
+ .long 1373600282
+ .long 1013935474
+ .long 3706496128
+ .long 1068430930
+ .long 1000610902
+ .long 1019673285
+ .long 3073179008
+ .long 1068496219
+ .long 1497143008
+ .long 1019900342
+ .long 2803716736
+ .long 1068562846
+ .long 1476677416
+ .long 1019444094
+ .long 3204984128
+ .long 1068628077
+ .long 1192335905
+ .long 1018748628
+ .long 831146624
+ .long 1068693273
+ .long 2733586224
+ .long 1018823295
+ .long 243029376
+ .long 1068758431
+ .long 950106081
+ .long 1019046675
+ .long 1735561920
+ .long 1068823549
+ .long 3546440856
+ .long 1020104712
+ .long 1339217792
+ .long 1068888626
+ .long 3028812387
+ .long 1019818321
+ .long 3706342144
+ .long 1068953659
+ .long 3814564029
+ .long 1017763871
+ .long 637726976
+ .long 1069018648
+ .long 3584007699
+ .long 1017976868
+ .long 1148779264
+ .long 1069083589
+ .long 2282532133
+ .long 1019483954
+ .long 1406131392
+ .long 1069148481
+ .long 1547359113
+ .long 1019786342
+ .long 1908875904
+ .long 1069213322
+ .long 1315508410
+ .long 1020009473
+ .long 3194947520
+ .long 1069278110
+ .long 3845393201
+ .long 1015803761
+ .long 1547487744
+ .long 1069342844
+ .long 3863107865
+ .long 1019810104
+ .long 1881061952
+ .long 1069407521
+ .long 4288343548
+ .long 1019687581
+ .long 563086336
+ .long 1069472140
+ .long 2582230241
+ .long 1020099350
+ .long 2594975552
+ .long 1069536698
+ .long 2306443764
+ .long 1019667244
+ .long 3438545024
+ .long 1069606573
+ .long 957455549
+ .long 1015587735
+ .long 4211357472
+ .long 1069670906
+ .long 2611778754
+ .long 1017877214
+ .long 3002835424
+ .long 1069735101
+ .long 235580458
+ .long 1020211685
+ .long 3905315424
+ .long 1069799150
+ .long 3630647617
+ .long 1018736849
+ .long 2849656576
+ .long 1069863047
+ .long 2412165062
+ .long 1019693004
+ .long 507429472
+ .long 1069926785
+ .long 1397750723
+ .long 1018412717
+ .long 2307470272
+ .long 1069990356
+ .long 1796470904
+ .long 1019796181
+ .long 1271814912
+ .long 1070053755
+ .long 189761565
+ .long 1016149115
+ .long 3800538144
+ .long 1070116974
+ .long 2524871582
+ .long 1018263353
+ .long 3916203552
+ .long 1070180008
+ .long 127848658
+ .long 1017672664
+ .long 457192032
+ .long 1070242851
+ .long 4020400938
+ .long 1019823010
+ .long 1385324704
+ .long 1070305495
+ .long 564511179
+ .long 1016079094
+ .long 2322869856
+ .long 1070367935
+ .long 2347103319
+ .long 1018927760
+ .long 3743438624
+ .long 1070430165
+ .long 877973862
+ .long 1019638162
+ .long 2392255552
+ .long 1070492180
+ .long 2432782267
+ .long 1018872629
+ .long 4180443328
+ .long 1070553973
+ .long 3102990015
+ .long 1020093101
+ .long 2547540832
+ .long 1070636485
+ .long 3877738253
+ .long 1017300424
+ .long 2735468912
+ .long 1070697461
+ .long 2446470256
+ .long 1019235378
+ .long 542633792
+ .long 1070757943
+ .long 583606328
+ .long 1018624131
+ .long 923265984
+ .long 1070817911
+ .long 1793926708
+ .long 1019714161
+ .long 918728448
+ .long 1070877348
+ .long 3726463586
+ .long 1019433296
+ .long 2572275008
+ .long 1070936237
+ .long 1845354238
+ .long 1019459238
+ .long 50974688
+ .long 1070994564
+ .long 983808064
+ .long 1016685418
+ .long 1105518320
+ .long 1071052313
+ .long 2357496692
+ .long 1015139882
+ .long 1264825328
+ .long 1071109472
+ .long 2244129354
+ .long 1019046344
+ .long 961157920
+ .long 1071166029
+ .long 3124185339
+ .long 1018541776
+ .long 1162701584
+ .long 1071221973
+ .long 1279780948
+ .long 1019268918
+ .long 3284935664
+ .long 1071277294
+ .long 2670033472
+ .long 1019833744
+ .long 497441888
+ .long 1071331985
+ .long 1032737410
+ .long 1019795212
+ .long 3377383904
+ .long 1071386036
+ .long 2356897182
+ .long 1020205553
+ .long 1126962000
+ .long 1071439443
+ .long 3723724586
+ .long 1015212418
+ .long 90291008
+ .long 1071492199
+ .long 4178672431
+ .long 1020186971
+ .long 190059536
+ .long 1071595741
+ .long 1763589807
+ .long 1019162163
+ .long 2497392840
+ .long 1071670654
+ .long 3036997041
+ .long 1020204325
+ .long 2616971944
+ .long 1071719773
+ .long 300151069
+ .long 1017041957
+ .long 2883518128
+ .long 1071767563
+ .long 2203981414
+ .long 1019190108
+ .long 1496354352
+ .long 1071814030
+ .long 332287966
+ .long 1016846435
+ .long 483276728
+ .long 1071859184
+ .long 653845024
+ .long 1018830914
+ .long 3097401072
+ .long 1071903039
+ .long 1514746408
+ .long 1019278972
+ .long 2737217248
+ .long 1071945615
+ .long 1358845067
+ .long 1017268275
+ .long 2072577560
+ .long 1071986933
+ .long 3041024735
+ .long 1019929672
+ .long 2266405656
+ .long 1072027017
+ .long 1271261130
+ .long 1012925070
+ .long 958652544
+ .long 1072065894
+ .long 2158017058
+ .long 1019955372
+ .long 3312993840
+ .long 1072103591
+ .long 765809169
+ .long 1019114443
+ .long 3177001304
+ .long 1072140139
+ .long 144180084
+ .long 1019822186
+ .long 3071642184
+ .long 1072175568
+ .long 4004602424
+ .long 1019420740
+ .long 4283953648
+ .long 1072209909
+ .long 1511950430
+ .long 1020176966
+ .long 1413754136
+ .long 1072243195
+ .long 856972295
+ .long 1015129638
+ .long 4073202944
+ .long 1072306725
+ .long 4068194804
+ .long 1019714860
+ .long 946117760
+ .long 1072366415
+ .long 694980733
+ .long 1020150135
+ .long 3980632032
+ .long 1072422512
+ .long 1313251280
+ .long 1019948709
+ .long 1468297112
+ .long 1072475260
+ .long 330111143
+ .long 1019809198
+ .long 3478063816
+ .long 1072524887
+ .long 2930067044
+ .long 1017784081
+ .long 1153979856
+ .long 1072571613
+ .long 2225786102
+ .long 1017634481
+ .long 2089828808
+ .long 1072615641
+ .long 474621367
+ .long 1017043414
+ .long 3531732632
+ .long 1072657163
+ .long 2276396220
+ .long 1018757240
+ .long 775214612
+ .long 1072694803
+ .long 3209744818
+ .long 1019963015
+ .long 662307284
+ .long 1072713319
+ .long 1381696763
+ .long 1019763781
+ .long 1192776652
+ .long 1072730830
+ .long 3017932994
+ .long 1015179769
+ .long 744202396
+ .long 1072747407
+ .long 2073854034
+ .long 1019512292
+ .long 8337908
+ .long 1072763115
+ .long 16004448
+ .long 1019599514
+ .long 3589868768
+ .long 1072778013
+ .long 1374369804
+ .long 1018019237
+ .long 121647320
+ .long 1072792159
+ .long 128481634
+ .long 1018115438
+ .long 2464923204
+ .long 1072805601
+ .long 1787331214
+ .long 1016798022
+ .long 4093304372
+ .long 1072830562
+ .long 3306868969
+ .long 1019384078
+ .long 1436891684
+ .long 1072853231
+ .long 676347266
+ .long 1017302183
+ .long 1104571840
+ .long 1072873890
+ .long 2870400285
+ .long 1019938149
+ .long 2037009832
+ .long 1072892781
+ .long 2956702105
+ .long 1016472908
+ .long 3139037960
+ .long 1072910111
+ .long 916057147
+ .long 1018364335
+ .long 1826698064
+ .long 1072926058
+ .long 2171961098
+ .long 1019669816
+ .long 1353941060
+ .long 1072940774
+ .long 1722928782
+ .long 1019926215
+ .long 1803191644
+ .long 1072954391
+ .long 1547878639
+ .long 1020259262
+ .long 1092591296
+ .long 1072967024
+ .long 3070107923
+ .long 1018320401
+ .long 2205372832
+ .long 1072978772
+ .long 787328196
+ .long 1014621351
+ .long 1291577100
+ .long 1072989723
+ .long 2964757301
+ .long 1020242528
+ .long 4234512804
+ .long 1072999952
+ .long 3136030038
+ .long 1017522144
+ .long 3248069132
+ .long 1073009528
+ .long 1506192355
+ .long 1018050472
+ .long 3932628500
+ .long 1073018509
+ .long 1045823554
+ .long 1019946655
+ .long 4195697848
+ .long 1073026948
+ .long 233443322
+ .long 1018917447
+ .long 2501811452
+ .long 1073034892
+ .long 901427976
+ .long 1017333852
+ .long 866379428
+ .long 1073049455
+ .long 2437443742
+ .long 1019678792
+ .long 1376865888
+ .long 1073062480
+ .long 3365790232
+ .long 1014547152
+ .long 3290094268
+ .long 1073074195
+ .long 3898947415
+ .long 1018683566
+ .long 354764884
+ .long 1073084787
+ .long 3854322404
+ .long 1019662058
+ .long 3332975496
+ .long 1073094406
+ .long 3171701655
+ .long 1017830922
+ .long 1141460088
+ .long 1073103181
+ .long 3946082701
+ .long 1020032019
+ .long 745761284
+ .long 1073111216
+ .long 1347210591
+ .long 1019106121
+ .long 1673304508
+ .long 1073118600
+ .long 1760606642
+ .long 1017324577
+ .long 983388240
+ .long 1073125409
+ .long 3740651204
+ .long 1019514104
+ .long 3895509100
+ .long 1073131706
+ .long 2409629983
+ .long 1020069322
+ .long 2128523668
+ .long 1073137548
+ .long 3045605368
+ .long 1018579174
+ .long 2075485692
+ .long 1073142981
+ .long 3720571789
+ .long 1017557436
+ .long 121855976
+ .long 1073148047
+ .long 2391744767
+ .long 1020160645
+ .long 4181733780
+ .long 1073152780
+ .long 995028816
+ .long 1019681295
+ .long 2887813280
+ .long 1073157214
+ .long 218733247
+ .long 1020003509
+ .long 2862180896
+ .long 1073161375
+ .long 2043806490
+ .long 1018602288
+ .long 3909375184
+ .long 1073168973
+ .long 1559903412
+ .long 1020103444
+ .long 3533966292
+ .long 1073175738
+ .long 734884149
+ .long 1018462962
+ .long 3815044608
+ .long 1073181799
+ .long 3630523428
+ .long 1017250093
+ .long 739639376
+ .long 1073187261
+ .long 4167476661
+ .long 1020008277
+ .long 1068309648
+ .long 1073192207
+ .long 2110061437
+ .long 1019295858
+ .long 2350566352
+ .long 1073196707
+ .long 582596516
+ .long 1018568821
+ .long 2529520024
+ .long 1073200819
+ .long 745552787
+ .long 1019053165
+ .long 1841667508
+ .long 1073204591
+ .long 3982568700
+ .long 1016503327
+ .long 2242261080
+ .long 1073208063
+ .long 3433582258
+ .long 1016196763
+ .long 715134328
+ .long 1073211270
+ .long 355901358
+ .long 1020087916
+ .long 2700735876
+ .long 1073214240
+ .long 3640957736
+ .long 1019780205
+ .long 141607580
+ .long 1073217000
+ .long 2488245051
+ .long 1020262395
+ .long 287934404
+ .long 1073219570
+ .long 2392691085
+ .long 1019883292
+ .long 2363373988
+ .long 1073221969
+ .long 4194561737
+ .long 1019237447
+ .long 3829340424
+ .long 1073224214
+ .long 429455526
+ .long 1019490975
+ .long 1988805928
+ .long 1073226320
+ .long 3029848706
+ .long 1018104889
+ .long 1647572320
+ .long 1073230161
+ .long 10289938
+ .long 1017394880
+ .long 3988000624
+ .long 1073233576
+ .long 1957559169
+ .long 1019434816
+ .long 4263843944
+ .long 1073236633
+ .long 204710264
+ .long 1019908761
+ .long 663197724
+ .long 1073239386
+ .long 1921757578
+ .long 1019778948
+ .long 3560800700
+ .long 1073241876
+ .long 3994348896
+ .long 1019230192
+ .long 2441785656
+ .long 1073244141
+ .long 871468611
+ .long 1014800505
+ .long 3277400272
+ .long 1073246209
+ .long 4092218139
+ .long 1020040842
+ .long 3951990120
+ .long 1073248105
+ .long 4276546478
+ .long 1019763677
+ .long 2737338540
+ .long 1073249850
+ .long 252776012
+ .long 1018794951
+ .long 1511361316
+ .long 1073251461
+ .long 3119653999
+ .long 1018514803
+ .long 3969162516
+ .long 1073252952
+ .long 1037069016
+ .long 1016792900
+ .long 413985240
+ .long 1073254338
+ .long 4110171432
+ .long 1020001345
+ .long 3681283576
+ .long 1073255627
+ .long 1463092818
+ .long 1020260354
+ .long 3146455488
+ .long 1073256831
+ .long 1031209123
+ .long 1016554799
+ .long 95214512
+ .long 1073257958
+ .long 1373808632
+ .long 1019493031
+ .long 4250240828
+ .long 1073259013
+ .long 3891047882
+ .long 1020108730
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .type ATAN_TBL,@object
+ .size ATAN_TBL,2624
+ .align 16
+P_TBL2:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 856972295
+ .long 1017226790
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 3164710438
+ .long 1413754136
+ .long 3221823995
+ .type P_TBL2,@object
+ .size P_TBL2,64
+ .align 16
+SELECT_B:
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .long 4294967295
+ .long 4294967295
+ .long 0
+ .long 0
+ .type SELECT_B,@object
+ .size SELECT_B,64
+ .align 16
+SGNMASK:
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .type SGNMASK,@object
+ .size SGNMASK,16
+ .align 16
+pi_table:
+ .long 1413754136
+ .long 1074340347
+ .long 856972295
+ .long 1017226790
+ .type pi_table,@object
+ .size pi_table,16
+ .align 16
+pi2_table:
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .type pi2_table,@object
+ .size pi2_table,16
+ .align 16
+pi4_table:
+ .long 1413754136
+ .long 1072243195
+ .long 856972295
+ .long 1015129638
+ .type pi4_table,@object
+ .size pi4_table,16
+ .align 4
+POW55:
+ .long 0
+ .long 1130364928
+ .type POW55,@object
+ .size POW55,8
+ .align 4
+INVEXPMASK:
+ .long 4294967295
+ .long 2148532223
+ .type INVEXPMASK,@object
+ .size INVEXPMASK,8
+ .align 4
+EXPMASK:
+ .long 0
+ .long 1072693248
+ .type EXPMASK,@object
+ .size EXPMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_atan2.1-.
+ .4byte ..___tag_value_atan2.5-..___tag_value_atan2.1
+ .2byte 0x0400
+ .4byte ..___tag_value_atan2.3-..___tag_value_atan2.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_atan2.4-..___tag_value_atan2.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_cosh.S b/libm/x86_64/e_cosh.S
new file mode 100644
index 0000000..8cdbca6
--- /dev/null
+++ b/libm/x86_64/e_cosh.S
@@ -0,0 +1,1372 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// cosh(x)=(exp(x)+exp(-x))/2
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7),
+// f=0.b1 b2 ... b7, k integer
+// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f]
+// Tp stores higher 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision
+//
+// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14},
+// for |x| in [1/8,3*2^8)
+// e^{-|x|}=2^{-k-f}*2^{-r}
+//
+// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp=
+// =2^k*Tp+2^k*Tp*P15+2^k*Dp
+// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)
+//
+// For |x| in [1/8, 3*2^7), cosh(x) is formed as
+// RN(2^k*Tp+2^{-k}*Tn)+2^k*Tp*P15+2^{-k}*Tn*P`15+2^{-k}*TnL+2^{-k}*Dn+2^k*Dp
+//
+// For |x| in [3*2^7, 3*2^8), (e^|x|)/2 is returned, and
+// the result is checked for overflow.
+//
+// For |x|<1/8, a Taylor polynomial expansion is used (degree 10)
+// (error bound for polynomial expansion is below 0.501 ulp)
+//
+// Special cases:
+// cosh(NaN) = quiet NaN, and raise invalid exception
+// cosh(INF) = that INF
+// cosh(0)=1
+// for finite argument, only cosh(0)=1 is exact
+// For IEEE double
+// cosh(x) overflows
+// for x > 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+
+# -- Begin cosh
+ENTRY(cosh)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_cosh.1:
+ pushq %rsi
+..___tag_value_cosh.3:
+..B1.2:
+ movsd HALFMASK(%rip), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd L2E(%rip), %xmm1
+ movsd 8+L2E(%rip), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd Shifter(%rip), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ andl $32767, %ecx
+ subl $16320, %ecx
+ cmpl $200, %ecx
+ jae .L_2TAG_PACKET_0.0.2
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ movq %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ xorpd %xmm5, %xmm5
+ subsd %xmm6, %xmm3
+ movapd cv(%rip), %xmm4
+ addsd %xmm1, %xmm2
+ movapd 16+cv(%rip), %xmm6
+ subsd %xmm3, %xmm7
+ movl $32704, %edx
+ pinsrw $3, %edx, %xmm5
+ movapd 32+cv(%rip), %xmm1
+ addsd %xmm7, %xmm2
+ movl $127, %edx
+ andl %eax, %edx
+ addl %edx, %edx
+ shrl $3, %eax
+ andl $65520, %eax
+ addl $16352, %eax
+ xorpd %xmm0, %xmm0
+ cmpl $184, %ecx
+ jae .L_2TAG_PACKET_1.0.2
+ pshufd $68, %xmm5, %xmm5
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ psubw %xmm0, %xmm5
+ lea T2f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm0
+ lea T2_neg_f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm5
+ pshufd $68, %xmm2, %xmm3
+ movapd 48+cv(%rip), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ mulpd %xmm3, %xmm3
+ mulpd %xmm2, %xmm4
+ mulpd %xmm2, %xmm6
+ mulpd 64+cv(%rip), %xmm2
+ mulpd %xmm3, %xmm1
+ mulpd %xmm3, %xmm7
+ mulpd %xmm3, %xmm4
+ mulpd %xmm3, %xmm1
+ addpd %xmm7, %xmm6
+ movq %xmm0, %xmm7
+ addpd %xmm1, %xmm4
+ shufpd $0, %xmm5, %xmm7
+ addpd %xmm5, %xmm0
+ mulpd %xmm7, %xmm2
+ addpd %xmm6, %xmm4
+ subsd %xmm0, %xmm7
+ mulpd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm5, %xmm7
+ addpd %xmm2, %xmm4
+ addsd %xmm6, %xmm7
+ pshufd $238, %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ addl $16320, %ecx
+ cmpl $16320, %ecx
+ ja .L_2TAG_PACKET_2.0.2
+ cmpl $15952, %ecx
+ jae .L_2TAG_PACKET_3.0.2
+ addsd %xmm2, %xmm6
+ movq ONEMASK(%rip), %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_1.0.2:
+ subl $16352, %eax
+ movl %eax, %ecx
+ andl $32752, %eax
+ shrl $1, %eax
+ andl $65520, %eax
+ subl %eax, %ecx
+ addl $16352, %eax
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ lea T2f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm0
+ pshufd $68, %xmm2, %xmm3
+ movsd 48+cv(%rip), %xmm7
+ mulsd %xmm3, %xmm3
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd 64+cv(%rip), %xmm2
+ mulsd %xmm3, %xmm1
+ mulsd %xmm3, %xmm7
+ mulsd %xmm3, %xmm4
+ addl $16368, %ecx
+ pinsrw $3, %ecx, %xmm5
+ mulsd %xmm3, %xmm1
+ addsd %xmm7, %xmm6
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ addsd %xmm6, %xmm4
+ mulsd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm6, %xmm4
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm5, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_4.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_3.0.2:
+ movapd pv(%rip), %xmm1
+ mulpd %xmm5, %xmm5
+ movapd 16+pv(%rip), %xmm2
+ xorpd %xmm3, %xmm3
+ movq %xmm5, %xmm0
+ mulpd %xmm5, %xmm1
+ movsd ONEMASK(%rip), %xmm6
+ mulpd %xmm5, %xmm5
+ movl $16352, %eax
+ pinsrw $3, %eax, %xmm3
+ addpd %xmm2, %xmm1
+ mulpd %xmm5, %xmm1
+ pshufd $238, %xmm1, %xmm2
+ mulsd %xmm1, %xmm5
+ mulsd %xmm3, %xmm0
+ addsd %xmm5, %xmm2
+ addsd %xmm2, %xmm0
+ addsd %xmm6, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_5.0.2
+ xorpd %xmm0, %xmm0
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ mulsd %xmm0, %xmm0
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ mulsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ movq %xmm0, (%rsp)
+..B1.3:
+ movq (%rsp), %xmm0
+.L_2TAG_PACKET_6.0.2:
+..B1.5:
+ popq %rcx
+..___tag_value_cosh.4:
+ ret
+..___tag_value_cosh.5:
+END(cosh)
+# -- End cosh
+ .section .rodata, "a"
+ .align 16
+ .align 16
+L2E:
+ .long 1610612736
+ .long 1080497479
+ .long 4166901572
+ .long 1053077003
+ .type L2E,@object
+ .size L2E,16
+ .align 16
+Shifter:
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .type Shifter,@object
+ .size Shifter,16
+ .align 16
+cv:
+ .long 3607404736
+ .long 1044146952
+ .long 3607404736
+ .long 3191630600
+ .long 4277811695
+ .long 1063661122
+ .long 4277811695
+ .long 3211144770
+ .long 2140175755
+ .long 1033864261
+ .long 2140175755
+ .long 1033864261
+ .long 4289495988
+ .long 1054113747
+ .long 4289495988
+ .long 1054113747
+ .long 4277811695
+ .long 1064709698
+ .long 4277811695
+ .long 3212193346
+ .type cv,@object
+ .size cv,80
+ .align 16
+T2f:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 3706687593
+ .long 1073526560
+ .long 3521726940
+ .long 1014301643
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .type T2f,@object
+ .size T2f,2048
+ .align 16
+T2_neg_f:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .type T2_neg_f,@object
+ .size T2_neg_f,2048
+ .align 16
+pv:
+ .long 3078135644
+ .long 1049787983
+ .long 381774870
+ .long 1062650220
+ .long 436314137
+ .long 1056571808
+ .long 1431655765
+ .long 1067799893
+ .type pv,@object
+ .size pv,32
+ .align 4
+HALFMASK:
+ .long 4160749568
+ .long 2147483647
+ .type HALFMASK,@object
+ .size HALFMASK,8
+ .align 4
+ONEMASK:
+ .long 0
+ .long 1072693248
+ .type ONEMASK,@object
+ .size ONEMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_cosh.1-.
+ .4byte ..___tag_value_cosh.5-..___tag_value_cosh.1
+ .2byte 0x0400
+ .4byte ..___tag_value_cosh.3-..___tag_value_cosh.1
+ .2byte 0x100e
+ .byte 0x04
+ .4byte ..___tag_value_cosh.4-..___tag_value_cosh.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_exp.S b/libm/x86_64/e_exp.S
new file mode 100644
index 0000000..6882dfc
--- /dev/null
+++ b/libm/x86_64/e_exp.S
@@ -0,0 +1,636 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Description:
+// Let K = 64 (table size).
+// x x/log(2) n
+// e = 2 = 2 * T[j] * (1 + P(y))
+// where
+// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K]
+// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2]
+// j/K
+// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
+//
+// P(y) is a minimax polynomial approximation of exp(x)-1
+// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
+//
+// To avoid problems with arithmetic overflow and underflow,
+// n n1 n2
+// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
+// where BIAS is a value of exponent bias.
+//
+// Special cases:
+// exp(NaN) = NaN
+// exp(+INF) = +INF
+// exp(-INF) = 0
+// exp(x) = 1 for subnormals
+// for finite argument, only exp(0)=1 is exact
+// For IEEE double
+// if x > 709.782712893383973096 then exp(x) overflow
+// if x < -745.133219101941108420 then exp(x) underflow
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin exp
+ENTRY(exp)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_exp.1:
+ subq $24, %rsp
+..___tag_value_exp.3:
+ movsd %xmm0, 8(%rsp)
+..B1.2:
+ unpcklpd %xmm0, %xmm0
+ movapd cv(%rip), %xmm1
+ movapd Shifter(%rip), %xmm6
+ movapd 16+cv(%rip), %xmm2
+ movapd 32+cv(%rip), %xmm3
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ movl $16527, %edx
+ subl %eax, %edx
+ subl $15504, %eax
+ orl %eax, %edx
+ cmpl $-2147483648, %edx
+ jae .L_2TAG_PACKET_0.0.2
+ mulpd %xmm0, %xmm1
+ addpd %xmm6, %xmm1
+ movapd %xmm1, %xmm7
+ subpd %xmm6, %xmm1
+ mulpd %xmm1, %xmm2
+ movapd 64+cv(%rip), %xmm4
+ mulpd %xmm1, %xmm3
+ movapd 80+cv(%rip), %xmm5
+ subpd %xmm2, %xmm0
+ movd %xmm7, %eax
+ movl %eax, %ecx
+ andl $63, %ecx
+ shll $4, %ecx
+ sarl $6, %eax
+ movl %eax, %edx
+ movdqa mmask(%rip), %xmm6
+ pand %xmm6, %xmm7
+ movdqa bias(%rip), %xmm6
+ paddq %xmm6, %xmm7
+ psllq $46, %xmm7
+ subpd %xmm3, %xmm0
+ lea Tbl_addr(%rip), %r8
+ movapd (%rcx,%r8), %xmm2
+ mulpd %xmm0, %xmm4
+ movapd %xmm0, %xmm6
+ movapd %xmm0, %xmm1
+ mulpd %xmm6, %xmm6
+ mulpd %xmm6, %xmm0
+ addpd %xmm4, %xmm5
+ mulsd %xmm6, %xmm0
+ mulpd 48+cv(%rip), %xmm6
+ addsd %xmm2, %xmm1
+ unpckhpd %xmm2, %xmm2
+ mulpd %xmm5, %xmm0
+ addsd %xmm0, %xmm1
+ orpd %xmm7, %xmm2
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ addsd %xmm6, %xmm0
+ addl $894, %edx
+ cmpl $1916, %edx
+ ja .L_2TAG_PACKET_1.0.2
+ mulsd %xmm2, %xmm0
+ addsd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_1.0.2:
+ xorpd %xmm3, %xmm3
+ movapd ALLONES(%rip), %xmm4
+ movl $-1022, %edx
+ subl %eax, %edx
+ movd %edx, %xmm5
+ psllq %xmm5, %xmm4
+ movl %eax, %ecx
+ sarl $1, %eax
+ pinsrw $3, %eax, %xmm3
+ movapd ebias(%rip), %xmm6
+ psllq $4, %xmm3
+ psubd %xmm3, %xmm2
+ mulsd %xmm2, %xmm0
+ cmpl $52, %edx
+ jg .L_2TAG_PACKET_2.0.2
+ andpd %xmm2, %xmm4
+ paddd %xmm6, %xmm3
+ subsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ cmpl $1023, %ecx
+ jge .L_2TAG_PACKET_3.0.2
+ pextrw $3, %xmm0, %ecx
+ andl $32768, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_4.0.2
+ movapd %xmm0, %xmm6
+ addsd %xmm4, %xmm0
+ mulsd %xmm3, %xmm0
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_5.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_5.0.2:
+ mulsd %xmm3, %xmm6
+ mulsd %xmm3, %xmm4
+ movq %xmm6, %xmm0
+ pxor %xmm4, %xmm6
+ psrad $31, %xmm6
+ pshufd $85, %xmm6, %xmm6
+ psllq $1, %xmm0
+ psrlq $1, %xmm0
+ pxor %xmm6, %xmm0
+ psrlq $63, %xmm6
+ paddq %xmm6, %xmm0
+ paddq %xmm4, %xmm0
+ movl $15, (%rsp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_4.0.2:
+ addsd %xmm4, %xmm0
+ mulsd %xmm3, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_3.0.2:
+ addsd %xmm4, %xmm0
+ mulsd %xmm3, %xmm0
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ jnb .L_2TAG_PACKET_7.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ paddd %xmm6, %xmm3
+ addpd %xmm2, %xmm0
+ mulsd %xmm3, %xmm0
+ movl $15, (%rsp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_8.0.2:
+ cmpl $2146435072, %eax
+ jae .L_2TAG_PACKET_9.0.2
+ movl 12(%rsp), %eax
+ cmpl $-2147483648, %eax
+ jae .L_2TAG_PACKET_10.0.2
+ movsd XMAX(%rip), %xmm0
+ mulsd %xmm0, %xmm0
+.L_2TAG_PACKET_7.0.2:
+ movl $14, (%rsp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_10.0.2:
+ movsd XMIN(%rip), %xmm0
+ mulsd %xmm0, %xmm0
+ movl $15, (%rsp)
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_9.0.2:
+ movl 8(%rsp), %edx
+ cmpl $2146435072, %eax
+ ja .L_2TAG_PACKET_11.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_11.0.2
+ movl 12(%rsp), %eax
+ cmpl $2146435072, %eax
+ jne .L_2TAG_PACKET_12.0.2
+ movsd INF(%rip), %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_12.0.2:
+ movsd ZERO(%rip), %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_11.0.2:
+ movsd 8(%rsp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ movl 12(%rsp), %eax
+ andl $2147483647, %eax
+ cmpl $1083179008, %eax
+ jae .L_2TAG_PACKET_8.0.2
+ movsd 8(%rsp), %xmm0
+ addsd ONE_val(%rip), %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ movq %xmm0, 16(%rsp)
+..B1.3:
+ movq 16(%rsp), %xmm0
+.L_2TAG_PACKET_13.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_exp.4:
+ ret
+..___tag_value_exp.5:
+END(exp)
+# -- End exp
+ .section .rodata, "a"
+ .align 16
+ .align 16
+cv:
+ .long 1697350398
+ .long 1079448903
+ .long 1697350398
+ .long 1079448903
+ .long 4277796864
+ .long 1065758274
+ .long 4277796864
+ .long 1065758274
+ .long 3164486458
+ .long 1025308570
+ .long 3164486458
+ .long 1025308570
+ .long 4294967294
+ .long 1071644671
+ .long 4294967294
+ .long 1071644671
+ .long 3811088480
+ .long 1062650204
+ .long 1432067621
+ .long 1067799893
+ .long 3230715663
+ .long 1065423125
+ .long 1431604129
+ .long 1069897045
+ .type cv,@object
+ .size cv,96
+ .align 16
+Shifter:
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 1127743488
+ .type Shifter,@object
+ .size Shifter,16
+ .align 16
+mmask:
+ .long 4294967232
+ .long 0
+ .long 4294967232
+ .long 0
+ .type mmask,@object
+ .size mmask,16
+ .align 16
+bias:
+ .long 65472
+ .long 0
+ .long 65472
+ .long 0
+ .type bias,@object
+ .size bias,16
+ .align 16
+Tbl_addr:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 235107661
+ .long 1018002367
+ .long 1048019040
+ .long 11418
+ .long 896005651
+ .long 1015861842
+ .long 3541402996
+ .long 22960
+ .long 1642514529
+ .long 1012987726
+ .long 410360776
+ .long 34629
+ .long 1568897900
+ .long 1016568486
+ .long 1828292879
+ .long 46424
+ .long 1882168529
+ .long 1010744893
+ .long 852742562
+ .long 58348
+ .long 509852888
+ .long 1017336174
+ .long 3490863952
+ .long 70401
+ .long 653277307
+ .long 1017431380
+ .long 2930322911
+ .long 82586
+ .long 1649557430
+ .long 1017729363
+ .long 1014845818
+ .long 94904
+ .long 1058231231
+ .long 1015777676
+ .long 3949972341
+ .long 107355
+ .long 1044000607
+ .long 1016786167
+ .long 828946858
+ .long 119943
+ .long 1151779725
+ .long 1015705409
+ .long 2288159958
+ .long 132667
+ .long 3819481236
+ .long 1016499965
+ .long 1853186616
+ .long 145530
+ .long 2552227826
+ .long 1015039787
+ .long 1709341917
+ .long 158533
+ .long 1829350193
+ .long 1015216097
+ .long 4112506593
+ .long 171677
+ .long 1913391795
+ .long 1015756674
+ .long 2799960843
+ .long 184965
+ .long 1303423926
+ .long 1015238005
+ .long 171030293
+ .long 198398
+ .long 1574172746
+ .long 1016061241
+ .long 2992903935
+ .long 211976
+ .long 3424156969
+ .long 1017196428
+ .long 926591434
+ .long 225703
+ .long 1938513547
+ .long 1017631273
+ .long 887463926
+ .long 239579
+ .long 2804567149
+ .long 1015390024
+ .long 1276261410
+ .long 253606
+ .long 631083525
+ .long 1017690182
+ .long 569847337
+ .long 267786
+ .long 1623370770
+ .long 1011049453
+ .long 1617004845
+ .long 282120
+ .long 3667985273
+ .long 1013894369
+ .long 3049340112
+ .long 296610
+ .long 3145379760
+ .long 1014403278
+ .long 3577096743
+ .long 311258
+ .long 2603100681
+ .long 1017152460
+ .long 1990012070
+ .long 326066
+ .long 3249202951
+ .long 1017448880
+ .long 1453150081
+ .long 341035
+ .long 419288974
+ .long 1016280325
+ .long 917841882
+ .long 356167
+ .long 3793507337
+ .long 1016095713
+ .long 3712504873
+ .long 371463
+ .long 728023093
+ .long 1016345318
+ .long 363667784
+ .long 386927
+ .long 2582678538
+ .long 1017123460
+ .long 2956612996
+ .long 402558
+ .long 7592966
+ .long 1016721543
+ .long 2186617380
+ .long 418360
+ .long 228611441
+ .long 1016696141
+ .long 1719614412
+ .long 434334
+ .long 2261665670
+ .long 1017457593
+ .long 1013258798
+ .long 450482
+ .long 544148907
+ .long 1017323666
+ .long 3907805043
+ .long 466805
+ .long 2383914918
+ .long 1017143586
+ .long 1447192520
+ .long 483307
+ .long 1176412038
+ .long 1017267372
+ .long 1944781190
+ .long 499988
+ .long 2882956373
+ .long 1013312481
+ .long 919555682
+ .long 516851
+ .long 3154077648
+ .long 1016528543
+ .long 2571947538
+ .long 533897
+ .long 348651999
+ .long 1016405780
+ .long 2604962540
+ .long 551129
+ .long 3253791412
+ .long 1015920431
+ .long 1110089947
+ .long 568549
+ .long 1509121860
+ .long 1014756995
+ .long 2568320822
+ .long 586158
+ .long 2617649212
+ .long 1017340090
+ .long 2966275556
+ .long 603959
+ .long 553214634
+ .long 1016457425
+ .long 2682146383
+ .long 621954
+ .long 730975783
+ .long 1014083580
+ .long 2191782032
+ .long 640145
+ .long 1486499517
+ .long 1016818996
+ .long 2069751140
+ .long 658534
+ .long 2595788928
+ .long 1016407932
+ .long 2990417244
+ .long 677123
+ .long 1853053619
+ .long 1015310724
+ .long 1434058175
+ .long 695915
+ .long 2462790535
+ .long 1015814775
+ .long 2572866477
+ .long 714911
+ .long 3693944214
+ .long 1017259110
+ .long 3092190714
+ .long 734114
+ .long 2979333550
+ .long 1017188654
+ .long 4076559942
+ .long 753526
+ .long 174054861
+ .long 1014300631
+ .long 2420883922
+ .long 773150
+ .long 816778419
+ .long 1014197934
+ .long 3716502172
+ .long 792987
+ .long 3507050924
+ .long 1015341199
+ .long 777507147
+ .long 813041
+ .long 1821514088
+ .long 1013410604
+ .long 3706687593
+ .long 833312
+ .long 920623539
+ .long 1016295433
+ .long 1242007931
+ .long 853805
+ .long 2789017511
+ .long 1014276997
+ .long 3707479175
+ .long 874520
+ .long 3586233004
+ .long 1015962192
+ .long 64696965
+ .long 895462
+ .long 474650514
+ .long 1016642419
+ .long 863738718
+ .long 916631
+ .long 1614448851
+ .long 1014281732
+ .long 3884662774
+ .long 938030
+ .long 2450082086
+ .long 1016164135
+ .long 2728693977
+ .long 959663
+ .long 1101668360
+ .long 1015989180
+ .long 3999357479
+ .long 981531
+ .long 835814894
+ .long 1015702697
+ .long 1533953344
+ .long 1003638
+ .long 1301400989
+ .long 1014466875
+ .long 2174652632
+ .long 1025985
+ .type Tbl_addr,@object
+ .size Tbl_addr,1024
+ .align 16
+ALLONES:
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .long 4294967295
+ .type ALLONES,@object
+ .size ALLONES,16
+ .align 16
+ebias:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 1072693248
+ .type ebias,@object
+ .size ebias,16
+ .align 4
+XMAX:
+ .long 4294967295
+ .long 2146435071
+ .type XMAX,@object
+ .size XMAX,8
+ .align 4
+XMIN:
+ .long 0
+ .long 1048576
+ .type XMIN,@object
+ .size XMIN,8
+ .align 4
+INF:
+ .long 0
+ .long 2146435072
+ .type INF,@object
+ .size INF,8
+ .align 4
+ZERO:
+ .long 0
+ .long 0
+ .type ZERO,@object
+ .size ZERO,8
+ .align 4
+ONE_val:
+ .long 0
+ .long 1072693248
+ .type ONE_val,@object
+ .size ONE_val,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_exp.1-.
+ .4byte ..___tag_value_exp.5-..___tag_value_exp.1
+ .2byte 0x0400
+ .4byte ..___tag_value_exp.3-..___tag_value_exp.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_exp.4-..___tag_value_exp.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_hypot.S b/libm/x86_64/e_hypot.S
new file mode 100644
index 0000000..089b2b4
--- /dev/null
+++ b/libm/x86_64/e_hypot.S
@@ -0,0 +1,210 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// X87 version:
+// Use 80-bit FPU precision fmul, fsqrt to compute square and sqrt.
+//
+// SSE version:
+// Swap x, y if |x|<|y|
+// For x=2^k*x, get y=y*2^(-k)
+// Get S ~ sqrt(x^2+y^2) (leading 1 + leading 25 mantissa bits)
+//
+// Get D = ( RN(x^2+y^2) - S^2 ) + ( x^2 - RN(x^2) ) +
+// + ( y^2 - ((RN(x^2+y^2)-RN(x^2)) )
+//
+// Result is 2^k*(S + Se), where Se = S*e
+// S*e is approximated as (D/2S)*( 1 - (D/2S)^2*1.0/S )
+//
+// Return 2^k*(S+Se)
+//
+// For |y/x|<2^(-64), return x
+//
+// For cases where maximum biased exponent is either greater than 7fdh or
+// below 32, take a special path to check for special cases (0, NaN, Inf),
+// possible overflow, and more accurate computation for denormal results
+//
+// Special cases:
+// hypot(x,y), hypot(y,x), and hypot(x,-y) are equivalent
+// hypot(x,+-0) is equivalent to fabs(x)
+// hypot(x,y) = y if (x==NaN or x==INF) and y==INF
+// hypot(x,y) = x if (x==NaN or x==INF) and y!=INF (even if y==NaN!)
+// hypot(x,y) = y if (x!=NaN and x!=INF) and (y==NaN or y==INF)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin hypot
+ENTRY(hypot)
+# parameter 1: %xmm0
+# parameter 2: %xmm1
+..B1.1:
+..___tag_value_hypot.1:
+..___tag_value_hypot.3:
+..B1.2:
+ subq $64, %rsp
+ movapd static_const_table(%rip), %xmm3
+ movsd %xmm0, 48(%rsp)
+ movsd %xmm1, 56(%rsp)
+ andpd %xmm3, %xmm0
+ andpd %xmm3, %xmm1
+ pextrw $3, %xmm0, %eax
+ pextrw $3, %xmm1, %edx
+ cmpl $24528, %eax
+ ja .L_2TAG_PACKET_0.0.1
+ cmpl $24528, %edx
+ ja .L_2TAG_PACKET_0.0.1
+.L_2TAG_PACKET_1.0.1:
+ fldl 48(%rsp)
+ fldl 56(%rsp)
+ fxch %st(1)
+ fmul %st(0), %st
+ fxch %st(1)
+ nop
+ fmul %st(0), %st
+ faddp %st, %st(1)
+ fsqrt
+ jmp .L_2TAG_PACKET_2.0.1
+.L_2TAG_PACKET_0.0.1:
+ cmpl $32752, %eax
+ movl %eax, %ecx
+ jae .L_2TAG_PACKET_3.0.1
+ subl %edx, %ecx
+ cmpl $32752, %edx
+ jae .L_2TAG_PACKET_3.0.1
+ addl $928, %ecx
+ addl %edx, %eax
+ cmpl $1856, %ecx
+ ja .L_2TAG_PACKET_4.0.1
+ cmpl $49056, %eax
+ jb .L_2TAG_PACKET_1.0.1
+ fldl 48(%rsp)
+ fldl 56(%rsp)
+ fxch %st(1)
+ fmul %st(0), %st
+ fxch %st(1)
+ nop
+ fmul %st(0), %st
+ faddp %st, %st(1)
+ fsqrt
+.L_2TAG_PACKET_5.0.1:
+ fstl (%rsp)
+ fstpt 16(%rsp)
+ xorl %eax, %eax
+ movw 24(%rsp), %ax
+ cmpl $17407, %eax
+ jae .L_2TAG_PACKET_6.0.1
+ fldl (%rsp)
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_4.0.1:
+ movsd %xmm0, 32(%rsp)
+ movsd %xmm1, 40(%rsp)
+ fldl 32(%rsp)
+ faddl 40(%rsp)
+ jmp .L_2TAG_PACKET_5.0.1
+.L_2TAG_PACKET_6.0.1:
+ fldl (%rsp)
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_3.0.1:
+ shufpd $0, %xmm1, %xmm0
+ movdqa %xmm0, %xmm2
+ movdqa 16+static_const_table(%rip), %xmm3
+ movsd %xmm0, 32(%rsp)
+ movsd %xmm1, 40(%rsp)
+ cmppd $3, %xmm0, %xmm2
+ cmppd $0, %xmm0, %xmm3
+ movmskpd %xmm2, %edx
+ movmskpd %xmm3, %rax
+ testl %edx, %edx
+ je .L_2TAG_PACKET_8.0.1
+ fldl 32(%rsp)
+ fmull 40(%rsp)
+ testq $1, %rax
+ jne .L_2TAG_PACKET_9.0.1
+ testq $2, %rax
+ jne .L_2TAG_PACKET_10.0.1
+ jmp .L_2TAG_PACKET_2.0.1
+.L_2TAG_PACKET_8.0.1:
+ fldl 32(%rsp)
+ faddl 40(%rsp)
+ jmp .L_2TAG_PACKET_2.0.1
+.L_2TAG_PACKET_9.0.1:
+ fstpl 40(%rsp)
+ fldl 32(%rsp)
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_10.0.1:
+ fstpl 32(%rsp)
+ fldl 40(%rsp)
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_2.0.1:
+.L_2TAG_PACKET_7.0.1:
+ fstpl 16(%rsp)
+ movq 16(%rsp), %xmm0
+ addq $64, %rsp
+ ret
+..B1.3:
+..___tag_value_hypot.4:
+END(hypot)
+# -- End hypot
+ .section .rodata, "a"
+ .align 16
+ .align 16
+static_const_table:
+ .long 4294967295
+ .long 2147483647
+ .long 4294967295
+ .long 2147483647
+ .long 0
+ .long 2146435072
+ .long 0
+ .long 2146435072
+ .type static_const_table,@object
+ .size static_const_table,32
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x00000014
+ .4byte 0x0000001c
+ .4byte ..___tag_value_hypot.1-.
+ .4byte ..___tag_value_hypot.4-..___tag_value_hypot.1
+ .2byte 0x0400
+ .4byte ..___tag_value_hypot.3-..___tag_value_hypot.1
+ .2byte 0x100e
+# End
diff --git a/libm/x86_64/e_log.S b/libm/x86_64/e_log.S
new file mode 100644
index 0000000..40cb5e2
--- /dev/null
+++ b/libm/x86_64/e_log.S
@@ -0,0 +1,779 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpss instruction (B0)
+// B = int((B0*2^7+0.5))/2^7
+//
+// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
+//
+// Result: k*log(2) - log(B) + p(r) if |x-1| >= small value (2^-6) and
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log(NaN) = quiet NaN, and raise invalid exception
+// log(+INF) = that INF
+// log(0) = -INF with divide-by-zero exception raised
+// log(1) = +0
+// log(x) = NaN with invalid exception raised if x < -0, including -INF
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin log
+ENTRY(log)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_log.1:
+ subq $24, %rsp
+..___tag_value_log.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ movq $0x3ff0000000000000, %rax
+ movd %rax, %xmm2
+ movq $0x77f0000000000000, %rdx
+ movd %rdx, %xmm3
+ movl $32768, %ecx
+ movd %rcx, %xmm4
+ movq $0xffffe00000000000, %r8
+ movd %r8, %xmm5
+ movq %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $16352, %ecx
+ psrlq $27, %xmm0
+ lea L_tbl(%rip), %r11
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ paddd %xmm4, %xmm0
+ orpd %xmm3, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm1, %xmm5
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm1
+ mulpd %xmm0, %xmm5
+ andl $32752, %eax
+ subl %ecx, %eax
+ cvtsi2sd %eax, %xmm7
+ mulsd %xmm0, %xmm1
+ movq log2(%rip), %xmm6
+ movapd coeff(%rip), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd (%r11,%rdx), %xmm0
+ movapd 16+coeff(%rip), %xmm4
+ addsd %xmm5, %xmm1
+ movapd 32+coeff(%rip), %xmm2
+ mulsd %xmm7, %xmm6
+ movddup %xmm1, %xmm5
+ mulsd 8+log2(%rip), %xmm7
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm4
+ mulpd %xmm5, %xmm5
+ movddup %xmm0, %xmm6
+ addsd %xmm1, %xmm0
+ addpd %xmm2, %xmm4
+ mulpd %xmm5, %xmm3
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm4
+ pshufd $238, %xmm0, %xmm2
+ addsd %xmm6, %xmm1
+ mulsd %xmm5, %xmm5
+ addsd %xmm2, %xmm7
+ addpd %xmm3, %xmm4
+ addsd %xmm7, %xmm1
+ mulpd %xmm5, %xmm4
+ addsd %xmm4, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ movq (%rsp), %xmm0
+ movq (%rsp), %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ cmpl $16, %eax
+ jb .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_4.0.2:
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_5.0.2:
+ ja .L_2TAG_PACKET_4.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_4.0.2
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_3.0.2:
+ xorpd %xmm1, %xmm1
+ addsd %xmm0, %xmm1
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_7.0.2
+ xorpd %xmm1, %xmm1
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ movq %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ psrlq $27, %xmm0
+ movl $18416, %ecx
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_5.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ movl $3, 16(%rsp)
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $2, 16(%rsp)
+.L_2TAG_PACKET_8.0.2:
+ movq %xmm0, 8(%rsp)
+..B1.3:
+ movq 8(%rsp), %xmm0
+.L_2TAG_PACKET_9.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_log.4:
+ ret
+..___tag_value_log.5:
+END(log)
+# -- End log
+ .section .rodata, "a"
+ .align 16
+ .align 16
+L_tbl:
+ .long 4277811200
+ .long 1072049730
+ .long 2479318832
+ .long 1026487127
+ .long 2854492160
+ .long 1072033410
+ .long 215631550
+ .long 1025638968
+ .long 1547061248
+ .long 1072017216
+ .long 2886781435
+ .long 1026423395
+ .long 649825280
+ .long 1072001146
+ .long 4281533405
+ .long 1024038923
+ .long 646346752
+ .long 1071985198
+ .long 1562735921
+ .long 1023790276
+ .long 2203734016
+ .long 1071969370
+ .long 1838397691
+ .long 3173936209
+ .long 1872169984
+ .long 1071953661
+ .long 3981202460
+ .long 1022325013
+ .long 669557760
+ .long 1071938069
+ .long 4182597802
+ .long 3173174122
+ .long 4076413952
+ .long 1071922591
+ .long 1209029111
+ .long 3170736207
+ .long 556125184
+ .long 1071907228
+ .long 821086028
+ .long 3173437049
+ .long 204914688
+ .long 1071891976
+ .long 2097025986
+ .long 3171071798
+ .long 387545088
+ .long 1071876834
+ .long 3142936996
+ .long 3173092218
+ .long 2912783360
+ .long 1071861800
+ .long 2502420140
+ .long 1024505919
+ .long 1144260608
+ .long 1071846874
+ .long 3315658140
+ .long 3173469843
+ .long 1471209472
+ .long 1071832053
+ .long 129621009
+ .long 3172443877
+ .long 1829683200
+ .long 1071817336
+ .long 3885467693
+ .long 1025535275
+ .long 288676864
+ .long 1071802722
+ .long 86139472
+ .long 3171639793
+ .long 3636378624
+ .long 1071788208
+ .long 1850238587
+ .long 1024654342
+ .long 1606817792
+ .long 1071773795
+ .long 3388899795
+ .long 3173675586
+ .long 1236164608
+ .long 1071759480
+ .long 3983599207
+ .long 1020046558
+ .long 1089616896
+ .long 1071745262
+ .long 4171974224
+ .long 1024773198
+ .long 4143093760
+ .long 1071731139
+ .long 2727587401
+ .long 3173965207
+ .long 600267776
+ .long 1071717112
+ .long 3147685042
+ .long 3173353031
+ .long 2249313280
+ .long 1071703177
+ .long 125835074
+ .long 1025255832
+ .long 3805303808
+ .long 1071689334
+ .long 2289991207
+ .long 1025460331
+ .long 87278592
+ .long 1071675583
+ .long 1106114045
+ .long 1025933602
+ .long 3195405312
+ .long 1071661920
+ .long 3885316576
+ .long 3171206239
+ .long 3853649920
+ .long 1071648346
+ .long 2977069852
+ .long 3171236771
+ .long 2944026624
+ .long 1071625048
+ .long 1008093493
+ .long 1023444474
+ .long 3993180160
+ .long 1071598247
+ .long 1862355595
+ .long 1024642533
+ .long 1454641152
+ .long 1071571617
+ .long 1514603089
+ .long 1026500596
+ .long 3286085632
+ .long 1071545154
+ .long 1400028424
+ .long 3173279056
+ .long 438773760
+ .long 1071518858
+ .long 120727864
+ .long 3172148914
+ .long 1212979200
+ .long 1071492725
+ .long 1625055594
+ .long 3172901933
+ .long 1189017600
+ .long 1071466754
+ .long 3920062376
+ .long 1025727407
+ .long 403064832
+ .long 1071440943
+ .long 1053271728
+ .long 3171391427
+ .long 3343210496
+ .long 1071415289
+ .long 3243395502
+ .long 3173627613
+ .long 1765777408
+ .long 1071389792
+ .long 2145968512
+ .long 1026354304
+ .long 461430784
+ .long 1071364449
+ .long 4094322285
+ .long 1026021467
+ .long 71706624
+ .long 1071339258
+ .long 763632021
+ .long 1024496933
+ .long 1380503552
+ .long 1071314217
+ .long 1383547992
+ .long 3173088453
+ .long 1015732224
+ .long 1071289325
+ .long 3198646877
+ .long 1025390322
+ .long 35977216
+ .long 1071264580
+ .long 2141026805
+ .long 1025754693
+ .long 3927306240
+ .long 1071239979
+ .long 282116272
+ .long 3173394334
+ .long 1125341184
+ .long 1071215523
+ .long 2768427504
+ .long 3172279059
+ .long 1666971648
+ .long 1071191208
+ .long 786837629
+ .long 3172427445
+ .long 2827694080
+ .long 1071167033
+ .long 3857122416
+ .long 3173014241
+ .long 2003683328
+ .long 1071142997
+ .long 859010954
+ .long 1026545007
+ .long 1004017664
+ .long 1071119098
+ .long 3356644970
+ .long 3173458064
+ .long 1753020416
+ .long 1071095334
+ .long 788338552
+ .long 1026157693
+ .long 1992718336
+ .long 1071071704
+ .long 1239179443
+ .long 1026394889
+ .long 3870234624
+ .long 1071048206
+ .long 2082614663
+ .long 1024926053
+ .long 1050437632
+ .long 1071024840
+ .long 660007840
+ .long 1025548499
+ .long 188395520
+ .long 1071001603
+ .long 3878792704
+ .long 3173889571
+ .long 3747176448
+ .long 1070978493
+ .long 144991708
+ .long 3171552042
+ .long 1405669376
+ .long 1070955511
+ .long 3999088879
+ .long 1025486317
+ .long 121151488
+ .long 1070932654
+ .long 2170865497
+ .long 1026473584
+ .long 2652319744
+ .long 1070909920
+ .long 453695652
+ .long 3173916809
+ .long 3262236672
+ .long 1070887309
+ .long 157800053
+ .long 3173984206
+ .long 601221120
+ .long 1070864820
+ .long 3968917661
+ .long 1023992886
+ .long 1999843328
+ .long 1070842450
+ .long 3053895004
+ .long 1024998228
+ .long 1992167424
+ .long 1070820199
+ .long 2968614856
+ .long 1024552653
+ .long 3788726272
+ .long 1070798065
+ .long 3542170808
+ .long 3173573242
+ .long 2094829568
+ .long 1070776048
+ .long 1246758132
+ .long 1026202874
+ .long 288675840
+ .long 1070754146
+ .long 3747328950
+ .long 1026331585
+ .long 1829681152
+ .long 1070732357
+ .long 3125197546
+ .long 1024100318
+ .long 1666869248
+ .long 1070710681
+ .long 1363656119
+ .long 1026336493
+ .long 3417110528
+ .long 1070689116
+ .long 4154791553
+ .long 1026267853
+ .long 2183653376
+ .long 1070667662
+ .long 1671819292
+ .long 3173785870
+ .long 1734434816
+ .long 1070646317
+ .long 373091049
+ .long 1025972363
+ .long 1615681536
+ .long 1070625080
+ .long 384650897
+ .long 1022926043
+ .long 1445382144
+ .long 1070603950
+ .long 344320330
+ .long 3172397196
+ .long 1823715328
+ .long 1070569756
+ .long 3389841200
+ .long 1025231852
+ .long 3839688704
+ .long 1070527917
+ .long 1706790417
+ .long 3167363349
+ .long 4293332992
+ .long 1070486286
+ .long 1614935088
+ .long 1019351591
+ .long 2966720512
+ .long 1070444861
+ .long 4145393717
+ .long 3173711658
+ .long 4066729984
+ .long 1070403639
+ .long 1974925028
+ .long 3171437182
+ .long 3337621504
+ .long 1070362619
+ .long 3314953170
+ .long 3169971314
+ .long 943448064
+ .long 1070321799
+ .long 1498682038
+ .long 3173862340
+ .long 1465634816
+ .long 1070281176
+ .long 1319952810
+ .long 3171693965
+ .long 1015734272
+ .long 1070240749
+ .long 1347821929
+ .long 3173544515
+ .long 118001664
+ .long 1070200516
+ .long 1751482746
+ .long 1026134093
+ .long 3707174912
+ .long 1070160474
+ .long 1486946159
+ .long 1023930920
+ .long 3946381312
+ .long 1070120623
+ .long 2867408081
+ .long 3171368276
+ .long 1699848192
+ .long 1070080961
+ .long 2590187139
+ .long 1025379803
+ .long 2235846656
+ .long 1070041485
+ .long 1888568069
+ .long 3172754960
+ .long 2339729408
+ .long 1070002194
+ .long 3852214753
+ .long 3173323149
+ .long 3196850176
+ .long 1069963086
+ .long 742141560
+ .long 1025101707
+ .long 1800683520
+ .long 1069924160
+ .long 3949500444
+ .long 3172102179
+ .long 3835801600
+ .long 1069885413
+ .long 3848895943
+ .long 1025913832
+ .long 2201202688
+ .long 1069846845
+ .long 1425913464
+ .long 1025868665
+ .long 2778279936
+ .long 1069808453
+ .long 2120889677
+ .long 3173831128
+ .long 2954203136
+ .long 1069770236
+ .long 592147081
+ .long 1019621288
+ .long 210141184
+ .long 1069732193
+ .long 3414275233
+ .long 1023647084
+ .long 709476352
+ .long 1069694321
+ .long 2413027164
+ .long 1024462115
+ .long 2116284416
+ .long 1069656619
+ .long 1144559924
+ .long 1026336654
+ .long 2183651328
+ .long 1069619086
+ .long 3459057650
+ .long 1025634168
+ .long 3047047168
+ .long 1069581720
+ .long 1879674924
+ .long 3173508573
+ .long 970711040
+ .long 1069541521
+ .long 1335954173
+ .long 3173332182
+ .long 2198478848
+ .long 1069467449
+ .long 2951103968
+ .long 3173892200
+ .long 1669611520
+ .long 1069393703
+ .long 531044147
+ .long 1025149248
+ .long 29114368
+ .long 1069320280
+ .long 3327831251
+ .long 1025918673
+ .long 2376949760
+ .long 1069247176
+ .long 737634533
+ .long 3172176000
+ .long 1085390848
+ .long 1069174390
+ .long 3108243400
+ .long 3171828406
+ .long 1566130176
+ .long 1069101918
+ .long 985483226
+ .long 1025708380
+ .long 792780800
+ .long 1069029758
+ .long 4184866295
+ .long 1024426204
+ .long 183156736
+ .long 1068957907
+ .long 2845699378
+ .long 1022107277
+ .long 1301782528
+ .long 1068886362
+ .long 1012735262
+ .long 3173804294
+ .long 1562411008
+ .long 1068815121
+ .long 2197086703
+ .long 3170187813
+ .long 2815549440
+ .long 1068744181
+ .long 2782613207
+ .long 1026345054
+ .long 2756124672
+ .long 1068673540
+ .long 2929486205
+ .long 3173037800
+ .long 3511050240
+ .long 1068603195
+ .long 1443733147
+ .long 3173331549
+ .long 3047047168
+ .long 1068533144
+ .long 1879674924
+ .long 3172459997
+ .long 3221667840
+ .long 1068427825
+ .long 1338588027
+ .long 3171815742
+ .long 3453861888
+ .long 1068288883
+ .long 1205348359
+ .long 3172624626
+ .long 3506110464
+ .long 1068150514
+ .long 893105198
+ .long 1025571866
+ .long 346013696
+ .long 1068012714
+ .long 3495569021
+ .long 3172563349
+ .long 4074029056
+ .long 1067875476
+ .long 3961106338
+ .long 3171065595
+ .long 3559784448
+ .long 1067738798
+ .long 1975385384
+ .long 3173783155
+ .long 797769728
+ .long 1067602675
+ .long 3760305787
+ .long 1026047642
+ .long 2313633792
+ .long 1067467101
+ .long 1559353171
+ .long 1023480256
+ .long 3960766464
+ .long 1067213778
+ .long 1067365107
+ .long 1025865926
+ .long 684261376
+ .long 1066944805
+ .long 844762164
+ .long 3173687482
+ .long 630718464
+ .long 1066676905
+ .long 2458269694
+ .long 1024033081
+ .long 1486061568
+ .long 1066410070
+ .long 115537874
+ .long 3173243995
+ .long 2743664640
+ .long 1065886792
+ .long 3665098304
+ .long 3173471607
+ .long 1971912704
+ .long 1065357333
+ .long 2577214440
+ .long 3171993451
+ .long 1498939392
+ .long 1064306693
+ .long 3409036923
+ .long 1025599151
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .type L_tbl,@object
+ .size L_tbl,2064
+ .align 16
+log2:
+ .long 4277811200
+ .long 1067855426
+ .long 2479318832
+ .long 1022292823
+ .type log2,@object
+ .size log2,16
+ .align 16
+coeff:
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1030730101
+ .long 3217380702
+ .long 1431655765
+ .long 1070945621
+ .long 2576980378
+ .long 1070176665
+ .long 0
+ .long 3219128320
+ .type coeff,@object
+ .size coeff,48
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_log.1-.
+ .4byte ..___tag_value_log.5-..___tag_value_log.1
+ .2byte 0x0400
+ .4byte ..___tag_value_log.3-..___tag_value_log.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_log.4-..___tag_value_log.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_log10.S b/libm/x86_64/e_log10.S
new file mode 100644
index 0000000..4f43a36
--- /dev/null
+++ b/libm/x86_64/e_log10.S
@@ -0,0 +1,807 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpss instruction (B0)
+// B = int((B0*LH*2^7+0.5))/2^7
+// LH is a short approximation for log10(e)
+//
+// Reduced argument: r=B*mx-LH (computed accurately in high and low parts)
+//
+// Result: k*log10(2) - log(B) + p(r)
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log10(0) = -INF with divide-by-zero exception raised
+// log10(1) = +0
+// log10(x) = NaN with invalid exception raised if x < -0, including -INF
+// log10(+INF) = +INF
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin log10
+ENTRY(log10)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_log10.1:
+ subq $24, %rsp
+..___tag_value_log10.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movl $1054736384, %ecx
+ movd %ecx, %xmm7
+ xorpd %xmm3, %xmm3
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm3
+ movq %xmm0, %xmm1
+ movl $32768, %edx
+ movd %edx, %xmm4
+ movapd HIGHSIGMASK(%rip), %xmm5
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $16352, %ecx
+ psrlq $27, %xmm0
+ movq LOG10_E(%rip), %xmm2
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $78, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+.L_2TAG_PACKET_1.0.2:
+ mulss %xmm7, %xmm0
+ orpd %xmm3, %xmm1
+ lea L_tbl(%rip), %r11
+ andpd %xmm1, %xmm5
+ paddd %xmm4, %xmm0
+ subsd %xmm5, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm6, %xmm0
+ andl $32752, %eax
+ subl %ecx, %eax
+ cvtsi2sd %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ mulsd %xmm0, %xmm1
+ movq log2(%rip), %xmm6
+ movapd coeff(%rip), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd -1504(%r11,%rdx), %xmm0
+ movapd 16+coeff(%rip), %xmm4
+ addsd %xmm5, %xmm1
+ movapd 32+coeff(%rip), %xmm2
+ mulsd %xmm7, %xmm6
+ pshufd $68, %xmm1, %xmm5
+ mulsd 8+log2(%rip), %xmm7
+ mulsd %xmm1, %xmm3
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm4
+ movq 8+LOG10_E(%rip), %xmm6
+ mulpd %xmm5, %xmm5
+ addpd %xmm2, %xmm4
+ mulpd %xmm5, %xmm3
+ pshufd $228, %xmm0, %xmm2
+ addsd %xmm1, %xmm0
+ mulsd %xmm1, %xmm4
+ subsd %xmm0, %xmm2
+ mulsd %xmm1, %xmm6
+ addsd %xmm2, %xmm1
+ pshufd $238, %xmm0, %xmm2
+ mulsd %xmm5, %xmm5
+ addsd %xmm2, %xmm7
+ addsd %xmm6, %xmm1
+ addpd %xmm3, %xmm4
+ addsd %xmm7, %xmm1
+ mulpd %xmm5, %xmm4
+ addsd %xmm4, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ movq (%rsp), %xmm0
+ movq (%rsp), %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_2.0.2
+ cmpl $16, %eax
+ jb .L_2TAG_PACKET_3.0.2
+.L_2TAG_PACKET_4.0.2:
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_5.0.2:
+ ja .L_2TAG_PACKET_4.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_4.0.2
+ jmp .L_2TAG_PACKET_6.0.2
+.L_2TAG_PACKET_3.0.2:
+ xorpd %xmm1, %xmm1
+ addsd %xmm0, %xmm1
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_7.0.2
+ xorpd %xmm1, %xmm1
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movq %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psrlq $27, %xmm0
+ movq LOG10_E(%rip), %xmm2
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $78, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_2.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_5.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ movl $9, 16(%rsp)
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $8, 16(%rsp)
+.L_2TAG_PACKET_8.0.2:
+ movq %xmm0, 8(%rsp)
+..B1.3:
+ movq 8(%rsp), %xmm0
+.L_2TAG_PACKET_9.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_log10.4:
+ ret
+..___tag_value_log10.5:
+END(log10)
+# -- End log10
+ .section .rodata, "a"
+ .align 16
+ .align 16
+HIGHSIGMASK:
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 4294959104
+ .type HIGHSIGMASK,@object
+ .size HIGHSIGMASK,16
+ .align 16
+LOG10_E:
+ .long 0
+ .long 1071366144
+ .long 3207479560
+ .long 1062894188
+ .type LOG10_E,@object
+ .size LOG10_E,16
+ .align 16
+L_tbl:
+ .long 1352628224
+ .long 1070810131
+ .long 521319256
+ .long 1025503025
+ .long 2150839296
+ .long 1070801944
+ .long 3329350096
+ .long 3170190015
+ .long 1360613376
+ .long 1070793794
+ .long 2024059075
+ .long 1024991594
+ .long 1875350528
+ .long 1070785680
+ .long 2163882141
+ .long 3163564137
+ .long 2312126464
+ .long 1070777602
+ .long 1975711076
+ .long 1023674196
+ .long 1306336256
+ .long 1070769560
+ .long 3524899523
+ .long 3170508164
+ .long 1806334976
+ .long 1070761553
+ .long 4254777025
+ .long 1025238739
+ .long 2483193856
+ .long 1070753581
+ .long 3800671317
+ .long 3172916830
+ .long 2025350144
+ .long 1070745644
+ .long 1731514745
+ .long 1025501083
+ .long 3433285632
+ .long 1070737741
+ .long 2551857336
+ .long 3169662186
+ .long 1134317568
+ .long 1070729873
+ .long 3426297655
+ .long 3172637891
+ .long 2457152512
+ .long 1070722038
+ .long 63549415
+ .long 1025415416
+ .long 1861803008
+ .long 1070714237
+ .long 1910171636
+ .long 1023977580
+ .long 2414140416
+ .long 1070706469
+ .long 4002514337
+ .long 3170841618
+ .long 2900726784
+ .long 1070698734
+ .long 3268064083
+ .long 1022459609
+ .long 2123517952
+ .long 1070691032
+ .long 1767031218
+ .long 1022448156
+ .long 3194569728
+ .long 1070683362
+ .long 3402332618
+ .long 3171671160
+ .long 650882048
+ .long 1070675725
+ .long 4146023905
+ .long 3171023038
+ .long 1928988672
+ .long 1070668119
+ .long 1438617867
+ .long 1016360491
+ .long 1594908672
+ .long 1070660545
+ .long 971389377
+ .long 1024763979
+ .long 2818746368
+ .long 1070653002
+ .long 3555925341
+ .long 3172434821
+ .long 194584576
+ .long 1070645491
+ .long 943919215
+ .long 3172950063
+ .long 1215096832
+ .long 1070638010
+ .long 2283358588
+ .long 1022335098
+ .long 501519360
+ .long 1070630560
+ .long 480904295
+ .long 1024437959
+ .long 1278266368
+ .long 1070623140
+ .long 2755806066
+ .long 3172342012
+ .long 2487812096
+ .long 1070615750
+ .long 2489653202
+ .long 3172481099
+ .long 3085451264
+ .long 1070608390
+ .long 3759184951
+ .long 3172574892
+ .long 2039090176
+ .long 1070601060
+ .long 1361176676
+ .long 3172355319
+ .long 953057280
+ .long 1070591423
+ .long 1176587546
+ .long 3166422018
+ .long 3370524672
+ .long 1070576879
+ .long 3669570051
+ .long 1025376630
+ .long 749742080
+ .long 1070562394
+ .long 707700964
+ .long 3170814058
+ .long 4008353792
+ .long 1070547965
+ .long 3247327652
+ .long 1022431400
+ .long 2612455424
+ .long 1070533594
+ .long 2453457344
+ .long 3172322969
+ .long 3230920704
+ .long 1070519279
+ .long 1296781801
+ .long 1025115335
+ .long 3965253632
+ .long 1070505020
+ .long 373075289
+ .long 1017938528
+ .long 2593157120
+ .long 1070476669
+ .long 1068054086
+ .long 1021616576
+ .long 925962240
+ .long 1070448537
+ .long 850121213
+ .long 1023928989
+ .long 1732556800
+ .long 1070420620
+ .long 1305206740
+ .long 3172665570
+ .long 3815630848
+ .long 1070392915
+ .long 192642943
+ .long 3172699907
+ .long 2001758208
+ .long 1070365420
+ .long 2820786683
+ .long 1024704867
+ .long 16746496
+ .long 1070338131
+ .long 1399573110
+ .long 3171372773
+ .long 1886492672
+ .long 1070311044
+ .long 3621428075
+ .long 3172974358
+ .long 3338196992
+ .long 1070284157
+ .long 3793882035
+ .long 1025124701
+ .long 381769728
+ .long 1070257468
+ .long 3877933342
+ .long 3170195490
+ .long 2186491904
+ .long 1070230972
+ .long 1838687089
+ .long 1017927292
+ .long 1008330752
+ .long 1070204668
+ .long 2228321664
+ .long 1025352196
+ .long 2247065600
+ .long 1070178552
+ .long 1413900906
+ .long 3170902532
+ .long 2964070400
+ .long 1070152622
+ .long 3590454629
+ .long 1025016844
+ .long 465154048
+ .long 1070126876
+ .long 2079688550
+ .long 3172268183
+ .long 883615744
+ .long 1070101310
+ .long 989244452
+ .long 3171900485
+ .long 1993768960
+ .long 1070075922
+ .long 1124327841
+ .long 3172964992
+ .long 1794471936
+ .long 1070050710
+ .long 1140575046
+ .long 1022673726
+ .long 2797932544
+ .long 1070025671
+ .long 1894836933
+ .long 3172544059
+ .long 3433797632
+ .long 1070000803
+ .long 3221831166
+ .long 3171921685
+ .long 2338371584
+ .long 1069976104
+ .long 3732461053
+ .long 3164513518
+ .long 2644013056
+ .long 1069951571
+ .long 2519460462
+ .long 3172548740
+ .long 3383814144
+ .long 1069927202
+ .long 2290997657
+ .long 1025499649
+ .long 3781380096
+ .long 1069902995
+ .long 380479405
+ .long 1025184136
+ .long 3245785088
+ .long 1069878948
+ .long 1096398261
+ .long 3169885192
+ .long 1366712320
+ .long 1069855059
+ .long 2218343715
+ .long 3170281628
+ .long 2204717056
+ .long 1069831325
+ .long 2668334011
+ .long 1025264524
+ .long 1401772032
+ .long 1069807745
+ .long 4103993159
+ .long 1022925721
+ .long 3356721152
+ .long 1069784316
+ .long 3573790772
+ .long 3172186527
+ .long 4041148416
+ .long 1069761037
+ .long 4027691910
+ .long 3171276990
+ .long 3880151040
+ .long 1069737906
+ .long 4087118786
+ .long 3172710734
+ .long 3453364224
+ .long 1069714921
+ .long 99014299
+ .long 3172003077
+ .long 3491092480
+ .long 1069692080
+ .long 3801836701
+ .long 3172989287
+ .long 575580160
+ .long 1069669382
+ .long 1920406012
+ .long 3170874125
+ .long 22282240
+ .long 1069646824
+ .long 964193370
+ .long 1019363159
+ .long 2991429632
+ .long 1069624404
+ .long 3372589890
+ .long 1023425053
+ .long 2189645824
+ .long 1069602122
+ .long 2610503872
+ .long 1023652442
+ .long 3341467648
+ .long 1069579975
+ .long 1190292004
+ .long 1022425665
+ .long 3711293440
+ .long 1069557962
+ .long 1104795356
+ .long 1023625829
+ .long 1380401152
+ .long 1069524644
+ .long 1156998217
+ .long 1025100499
+ .long 765710336
+ .long 1069481144
+ .long 1736649113
+ .long 1024999439
+ .long 849412096
+ .long 1069437902
+ .long 2618178330
+ .long 3170853629
+ .long 1433104384
+ .long 1069394915
+ .long 43477267
+ .long 3170378811
+ .long 2548596736
+ .long 1069352180
+ .long 3967367063
+ .long 1025246584
+ .long 157577216
+ .long 1069309695
+ .long 100402533
+ .long 3172825502
+ .long 3326238720
+ .long 1069267455
+ .long 1176892909
+ .long 1025464099
+ .long 4155494400
+ .long 1069225459
+ .long 3713707617
+ .long 3172630046
+ .long 3545804800
+ .long 1069183704
+ .long 857007315
+ .long 1024965777
+ .long 2602520576
+ .long 1069142187
+ .long 2588758347
+ .long 1022463131
+ .long 2631196672
+ .long 1069100905
+ .long 2118424235
+ .long 1022490989
+ .long 838135808
+ .long 1069059856
+ .long 4117002727
+ .long 1024874520
+ .long 3210903552
+ .long 1069019036
+ .long 650070125
+ .long 3172012966
+ .long 3039211520
+ .long 1068978444
+ .long 438055812
+ .long 1017743757
+ .long 2385633280
+ .long 1068938077
+ .long 3011990369
+ .long 3171312044
+ .long 3491618816
+ .long 1068897932
+ .long 712813818
+ .long 3172720400
+ .long 183644160
+ .long 1068858008
+ .long 4287006742
+ .long 1022379728
+ .long 3639214080
+ .long 1068818300
+ .long 353762279
+ .long 3172980009
+ .long 3728416768
+ .long 1068778808
+ .long 1851367730
+ .long 1025486574
+ .long 3370094592
+ .long 1068739529
+ .long 4046594913
+ .long 3172567047
+ .long 1348407296
+ .long 1068700461
+ .long 143189675
+ .long 1025397632
+ .long 899403776
+ .long 1068661601
+ .long 3753687842
+ .long 3170772772
+ .long 1117708288
+ .long 1068622947
+ .long 1857340812
+ .long 3170782678
+ .long 1248276480
+ .long 1068584497
+ .long 1289858203
+ .long 1025222289
+ .long 683237376
+ .long 1068546249
+ .long 2356679608
+ .long 3171629170
+ .long 3253764096
+ .long 1068508200
+ .long 3267136556
+ .long 1018554987
+ .long 94478336
+ .long 1068441756
+ .long 1927868814
+ .long 3169378180
+ .long 3233144832
+ .long 1068366445
+ .long 2682188854
+ .long 1023964004
+ .long 2940297216
+ .long 1068291522
+ .long 275301289
+ .long 1023944679
+ .long 3677708288
+ .long 1068216982
+ .long 302658771
+ .long 1024465567
+ .long 1576968192
+ .long 1068142822
+ .long 3672035940
+ .long 3172254610
+ .long 1614069760
+ .long 1068069037
+ .long 480052905
+ .long 3172692062
+ .long 424435712
+ .long 1067995624
+ .long 2207869657
+ .long 3170965436
+ .long 3477782528
+ .long 1067922578
+ .long 2980661858
+ .long 3164990018
+ .long 3598401536
+ .long 1067849897
+ .long 1974393034
+ .long 3171357083
+ .long 2435235840
+ .long 1067777577
+ .long 1385289011
+ .long 1024615823
+ .long 1867333632
+ .long 1067705614
+ .long 3442236633
+ .long 1025334384
+ .long 3999301632
+ .long 1067634004
+ .long 3506472073
+ .long 1025132546
+ .long 2566971392
+ .long 1067562745
+ .long 1425757592
+ .long 3172358463
+ .long 112943104
+ .long 1067491833
+ .long 1693407156
+ .long 3172426603
+ .long 3079929856
+ .long 1067392159
+ .long 3999942455
+ .long 1018549369
+ .long 2443837440
+ .long 1067251701
+ .long 974534460
+ .long 1023963412
+ .long 359366656
+ .long 1067111917
+ .long 2204915018
+ .long 1013514416
+ .long 3564519424
+ .long 1066972799
+ .long 3977441659
+ .long 3170879860
+ .long 2011086848
+ .long 1066834343
+ .long 590145514
+ .long 1025390011
+ .long 3216982016
+ .long 1066696541
+ .long 3629120110
+ .long 1024330313
+ .long 2194128896
+ .long 1066559388
+ .long 2367098512
+ .long 3172260338
+ .long 2916220928
+ .long 1066422877
+ .long 2262431886
+ .long 1021229446
+ .long 2263941120
+ .long 1066172214
+ .long 3118507287
+ .long 1021484970
+ .long 3076292608
+ .long 1065901726
+ .long 1411737803
+ .long 3172957147
+ .long 1186136064
+ .long 1065632488
+ .long 3109349337
+ .long 1025397383
+ .long 3085303808
+ .long 1065364487
+ .long 584715031
+ .long 3172596519
+ .long 1821048832
+ .long 1064842211
+ .long 2182246895
+ .long 3172536214
+ .long 697368576
+ .long 1064311094
+ .long 3157561765
+ .long 3172716357
+ .long 894042112
+ .long 1063260131
+ .long 3237958154
+ .long 3172587292
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .type L_tbl,@object
+ .size L_tbl,2064
+ .align 16
+log2:
+ .long 1352628224
+ .long 1066615827
+ .long 521319256
+ .long 1021308721
+ .type log2,@object
+ .size log2,16
+ .align 16
+coeff:
+ .long 3248877870
+ .long 1077250164
+ .long 1691676429
+ .long 3221787401
+ .long 945132465
+ .long 3223701783
+ .long 3700831335
+ .long 1073506818
+ .long 2141010593
+ .long 1075227551
+ .long 3698831637
+ .long 3220339442
+ .type coeff,@object
+ .size coeff,48
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_log10.1-.
+ .4byte ..___tag_value_log10.5-..___tag_value_log10.1
+ .2byte 0x0400
+ .4byte ..___tag_value_log10.3-..___tag_value_log10.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_log10.4-..___tag_value_log10.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_pow.S b/libm/x86_64/e_pow.S
new file mode 100644
index 0000000..9ec3828
--- /dev/null
+++ b/libm/x86_64/e_pow.S
@@ -0,0 +1,4282 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// log2(x) calculation:
+//
+// Get B~1/mx based on the output of rcpps instruction (B0)
+// B = int((B0*LH*2^9+0.5))/2^9
+// LH is a short approximation for log2(e)
+//
+// Reduced argument, scaled by LH:
+// r=B*mx-LH (computed accurately in high and low parts)
+//
+// log2(x) result: k - log2(B) + p(r)
+// p(r) is a degree 8 polynomial
+// -log2(B) read from data table (high, low parts)
+// log2(x) is formed from high and low parts
+// For |x| in [1-1/32, 1+1/16), a slower but more accurate computation
+// based om the same table design is performed.
+//
+// Main path is taken if | floor(log2(|log2(|x|)|) + floor(log2|y|) | < 8,
+// to filter out all potential OF/UF cases.
+// exp2(y*log2(x)) is computed using an 8-bit index table and a degree 5
+// polynomial
+//
+// Special cases:
+// pow(-0,y) = -INF and raises the divide-by-zero exception for y an odd
+// integer < 0.
+// pow(-0,y) = +INF and raises the divide-by-zero exception for y < 0 and
+// not an odd integer.
+// pow(-0,y) = -0 for y an odd integer > 0.
+// pow(-0,y) = +0 for y > 0 and not an odd integer.
+// pow(-1,-INF) = 1.
+// pow(+1,y) = 1 for any y, even a NaN.
+// pow(x,-0) = 1 for any x, even a NaN.
+// pow(x,y) = a NaN and raises the invalid exception for finite x < 0 and
+// finite non-integer y.
+// pow(x,-INF) = +INF for |x|<1.
+// pow(x,-INF) = +0 for |x|>1.
+// pow(x,+INF) = +0 for |x|<1.
+// pow(x,+INF) = +INF for |x|>1.
+// pow(-INF,y) = -0 for y an odd integer < 0.
+// pow(-INF,y) = +0 for y < 0 and not an odd integer.
+// pow(-INF,y) = -INF for y an odd integer > 0.
+// pow(-INF,y) = +INF for y > 0 and not an odd integer.
+// pow(+INF,y) = +0 for y <0.
+// pow(+INF,y) = +INF for y >0.
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin pow
+ENTRY(pow)
+# parameter 1: %xmm0
+# parameter 2: %xmm1
+..B1.1:
+..___tag_value_pow.1:
+ subq $40, %rsp
+..___tag_value_pow.3:
+ movsd %xmm0, 8(%rsp)
+ movsd %xmm1, 16(%rsp)
+..B1.2:
+ pextrw $3, %xmm0, %eax
+ xorpd %xmm2, %xmm2
+ movq $0x3ff0000000000000, %r9
+ movd %r9, %xmm2
+ movl $1069088768, %r8d
+ movd %r8, %xmm7
+ xorpd %xmm1, %xmm1
+ movq $0x77f0000000000000, %r10
+ movd %r10, %xmm1
+ movq %xmm0, %xmm3
+ movl $32752, %edx
+ andl %eax, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ orpd %xmm2, %xmm0
+ movapd HIGHSIGMASK(%rip), %xmm6
+ psrlq $27, %xmm0
+ movq LOG2_E(%rip), %xmm2
+ psrld $2, %xmm0
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm3
+ movl $8192, %r11d
+ movd %r11, %xmm4
+ psrlq $12, %xmm3
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ movq $0, %r8
+.L_2TAG_PACKET_1.0.2:
+ mulss %xmm7, %xmm0
+ movl $-1, %edx
+ subl $4, %ecx
+ shll %cl, %edx
+ shlq $32, %rdx
+ movd %rdx, %xmm5
+ orpd %xmm1, %xmm3
+ subl $16351, %eax
+ cmpl $1, %eax
+ jbe .L_2TAG_PACKET_2.0.2
+ paddd %xmm4, %xmm0
+ andpd %xmm3, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+.L_2TAG_PACKET_3.0.2:
+ subsd %xmm5, %xmm3
+ andpd %xmm6, %xmm0
+ subl $1, %eax
+ sarl $4, %eax
+ cvtsi2sd %eax, %xmm7
+ mulpd %xmm0, %xmm5
+.L_2TAG_PACKET_4.0.2:
+ mulsd %xmm0, %xmm3
+ movapd coeff(%rip), %xmm1
+ lea L_tbl(%rip), %r11
+ subsd %xmm2, %xmm5
+ movapd 16+coeff(%rip), %xmm4
+ movl %eax, %ecx
+ sarl $31, %eax
+ addl %eax, %ecx
+ xorl %ecx, %eax
+ addl $1, %eax
+ bsr %eax, %eax
+ unpcklpd %xmm3, %xmm5
+ movapd 32+coeff(%rip), %xmm6
+ addsd %xmm5, %xmm3
+ andl $16760832, %edx
+ shrl $10, %edx
+ addpd -3648(%r11,%rdx), %xmm5
+ movapd 48+coeff(%rip), %xmm0
+ pshufd $68, %xmm3, %xmm2
+ mulsd %xmm3, %xmm3
+ mulpd %xmm2, %xmm1
+ mulpd %xmm2, %xmm4
+ addsd %xmm7, %xmm5
+ mulsd %xmm3, %xmm2
+ addpd %xmm1, %xmm6
+ mulsd %xmm3, %xmm3
+ addpd %xmm4, %xmm0
+ movq 16(%rsp), %xmm1
+ movw 22(%rsp), %cx
+ pshufd $238, %xmm5, %xmm7
+ movq HIGHMASK_Y(%rip), %xmm4
+ mulpd %xmm2, %xmm6
+ pshufd $68, %xmm3, %xmm3
+ mulpd %xmm2, %xmm0
+ shll $4, %eax
+ subl $15872, %eax
+ andl $32752, %ecx
+ addl %ecx, %eax
+ mulpd %xmm6, %xmm3
+ cmpl $624, %eax
+ jae .L_2TAG_PACKET_5.0.2
+ xorpd %xmm6, %xmm6
+ movl $17080, %edx
+ pinsrw $3, %edx, %xmm6
+ movq %xmm1, %xmm2
+ andpd %xmm1, %xmm4
+ subsd %xmm4, %xmm1
+ mulsd %xmm5, %xmm4
+ addsd %xmm7, %xmm0
+ mulsd %xmm5, %xmm1
+ movq %xmm6, %xmm7
+ addsd %xmm4, %xmm6
+ lea T_exp(%rip), %r11
+ addpd %xmm0, %xmm3
+ movd %xmm6, %edx
+ subsd %xmm7, %xmm6
+ pshufd $238, %xmm3, %xmm0
+ subsd %xmm6, %xmm4
+ addsd %xmm3, %xmm0
+ movl %edx, %ecx
+ andl $255, %edx
+ addl %edx, %edx
+ movapd (%r11,%rdx,8), %xmm5
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ movapd e_coeff(%rip), %xmm7
+ movapd 16+e_coeff(%rip), %xmm3
+ shll $12, %ecx
+ xorl %r8d, %ecx
+ andl $-1048576, %ecx
+ movd %rcx, %xmm6
+ addsd %xmm4, %xmm2
+ movq $0x3fe62e42fefa39ef, %r9
+ movd %r9, %xmm1
+ pshufd $68, %xmm2, %xmm0
+ pshufd $68, %xmm2, %xmm4
+ mulsd %xmm2, %xmm1
+ pshufd $17, %xmm6, %xmm6
+ mulpd %xmm0, %xmm0
+ mulpd %xmm4, %xmm7
+ paddd %xmm6, %xmm5
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ mulsd %xmm0, %xmm0
+ addpd %xmm7, %xmm3
+ addsd %xmm6, %xmm1
+ mulpd %xmm3, %xmm0
+ pshufd $238, %xmm0, %xmm3
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm0
+ addsd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ addl $16, %eax
+ movl $32752, %edx
+ andl %eax, %edx
+ cmpl $32752, %edx
+ je .L_2TAG_PACKET_6.0.2
+ testl $32768, %eax
+ jne .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_8.0.2:
+ movq 8(%rsp), %xmm0
+ movq 8(%rsp), %xmm3
+ movd %xmm3, %edx
+ psrlq $32, %xmm3
+ movd %xmm3, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_9.0.2
+ xorpd %xmm3, %xmm3
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm3
+ mulsd %xmm3, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movq %xmm0, %xmm3
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psrlq $27, %xmm0
+ movq LOG2_E(%rip), %xmm2
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm3
+ movapd HIGHSIGMASK(%rip), %xmm6
+ psrlq $12, %xmm3
+ mulss %xmm7, %xmm0
+ movl $-1024, %edx
+ movd %edx, %xmm5
+ orpd %xmm1, %xmm3
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm3, %xmm5
+ movl $0, %r8d
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ andl $32752, %eax
+ subl $18416, %eax
+ sarl $4, %eax
+ cvtsi2sd %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_10.0.2:
+ movq 8(%rsp), %xmm0
+ movq 8(%rsp), %xmm3
+ movd %xmm3, %edx
+ psrlq $32, %xmm3
+ movd %xmm3, %ecx
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_9.0.2
+ xorpd %xmm3, %xmm3
+ movl $18416, %eax
+ pinsrw $3, %eax, %xmm3
+ mulsd %xmm3, %xmm0
+ xorpd %xmm2, %xmm2
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm2
+ movq %xmm0, %xmm3
+ pextrw $3, %xmm0, %eax
+ orpd %xmm2, %xmm0
+ movl $18416, %ecx
+ psrlq $27, %xmm0
+ movq LOG2_E(%rip), %xmm2
+ psrld $2, %xmm0
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm3
+ movapd HIGHSIGMASK(%rip), %xmm6
+ psrlq $12, %xmm3
+ mulss %xmm7, %xmm0
+ movl $-1024, %edx
+ movd %edx, %xmm5
+ orpd %xmm1, %xmm3
+ paddd %xmm4, %xmm0
+ psllq $32, %xmm5
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm3, %xmm5
+ movl $-2147483648, %r8d
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ andl $32752, %eax
+ subl $18416, %eax
+ sarl $4, %eax
+ cvtsi2sd %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ jmp .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_11.0.2
+ cmpl $736, %eax
+ jae .L_2TAG_PACKET_12.0.2
+ addsd %xmm7, %xmm0
+ movq HALFMASK(%rip), %xmm2
+ addpd %xmm0, %xmm3
+ xorpd %xmm6, %xmm6
+ movl $17080, %eax
+ pinsrw $3, %eax, %xmm6
+ pshufd $238, %xmm3, %xmm0
+ addsd %xmm3, %xmm0
+ movq %xmm5, %xmm3
+ addsd %xmm0, %xmm5
+ movq %xmm2, %xmm4
+ subsd %xmm5, %xmm3
+ movq %xmm5, %xmm7
+ andpd %xmm2, %xmm5
+ movq %xmm1, %xmm2
+ andpd %xmm1, %xmm4
+ subsd %xmm5, %xmm7
+ addsd %xmm3, %xmm0
+ subsd %xmm4, %xmm1
+ mulsd %xmm5, %xmm4
+ addsd %xmm7, %xmm0
+ mulsd %xmm0, %xmm2
+ movq %xmm6, %xmm7
+ mulsd %xmm5, %xmm1
+ addsd %xmm4, %xmm6
+ movd %xmm6, %eax
+ subsd %xmm7, %xmm6
+ lea T_exp(%rip), %r11
+ addsd %xmm1, %xmm2
+ movapd e_coeff(%rip), %xmm7
+ movapd 16+e_coeff(%rip), %xmm3
+ subsd %xmm6, %xmm4
+ pextrw $3, %xmm6, %edx
+ movl %eax, %ecx
+ andl $255, %eax
+ addl %eax, %eax
+ movapd (%r11,%rax,8), %xmm5
+ addsd %xmm4, %xmm2
+ sarl $8, %ecx
+ movl %ecx, %eax
+ sarl $1, %ecx
+ subl %ecx, %eax
+ shll $20, %ecx
+ xorl %r8d, %ecx
+ movd %ecx, %xmm6
+ movq 32+e_coeff(%rip), %xmm1
+ andl $32767, %edx
+ cmpl $16529, %edx
+ ja .L_2TAG_PACKET_12.0.2
+ pshufd $68, %xmm2, %xmm0
+ pshufd $68, %xmm2, %xmm4
+ mulpd %xmm0, %xmm0
+ mulpd %xmm4, %xmm7
+ pshufd $17, %xmm6, %xmm6
+ mulsd %xmm2, %xmm1
+ mulsd %xmm0, %xmm0
+ paddd %xmm6, %xmm5
+ addpd %xmm7, %xmm3
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm5, %xmm6
+ mulpd %xmm3, %xmm0
+ addsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm3
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ shll $4, %eax
+ xorpd %xmm4, %xmm4
+ addl $16368, %eax
+ pinsrw $3, %eax, %xmm4
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm0
+ movq %xmm0, %xmm1
+ addsd %xmm5, %xmm0
+ mulsd %xmm4, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ je .L_2TAG_PACKET_13.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_14.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ movq 16(%rsp), %xmm1
+ movq 8(%rsp), %xmm0
+ movq %xmm0, %xmm2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_15.0.2
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_16.0.2
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_16.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ movl $29, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_18.0.2:
+ movq 16(%rsp), %xmm0
+ addpd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_15.0.2:
+ movd %xmm1, %eax
+ movq %xmm1, %xmm2
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_19.0.2
+ pextrw $3, %xmm2, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ jne .L_2TAG_PACKET_20.0.2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ jne .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_20.0.2:
+ pextrw $3, %xmm0, %eax
+ testl $32768, %eax
+ jne .L_2TAG_PACKET_21.0.2
+ testl $-2147483648, %ecx
+ jne .L_2TAG_PACKET_22.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_23.0.2:
+ movq 16(%rsp), %xmm1
+ movd %xmm1, %eax
+ testl $1, %eax
+ jne .L_2TAG_PACKET_24.0.2
+ testl $2, %eax
+ jne .L_2TAG_PACKET_25.0.2
+ jmp .L_2TAG_PACKET_24.0.2
+.L_2TAG_PACKET_21.0.2:
+ shrl $20, %ecx
+ andl $2047, %ecx
+ cmpl $1075, %ecx
+ ja .L_2TAG_PACKET_24.0.2
+ je .L_2TAG_PACKET_26.0.2
+ cmpl $1074, %ecx
+ ja .L_2TAG_PACKET_23.0.2
+ cmpl $1023, %ecx
+ jb .L_2TAG_PACKET_24.0.2
+ movq 16(%rsp), %xmm1
+ movl $17208, %eax
+ xorpd %xmm3, %xmm3
+ pinsrw $3, %eax, %xmm3
+ movq %xmm3, %xmm4
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ jne .L_2TAG_PACKET_24.0.2
+ movd %xmm3, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_24.0.2
+.L_2TAG_PACKET_25.0.2:
+ movq 16(%rsp), %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32768, %eax
+ jne .L_2TAG_PACKET_27.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_27.0.2:
+ xorpd %xmm0, %xmm0
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_24.0.2:
+ movq 16(%rsp), %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32768, %eax
+ jne .L_2TAG_PACKET_22.0.2
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_26.0.2:
+ movq 16(%rsp), %xmm1
+ movd %xmm1, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_24.0.2
+ jmp .L_2TAG_PACKET_25.0.2
+.L_2TAG_PACKET_28.0.2:
+ movd %xmm1, %eax
+ psrlq $20, %xmm1
+ movd %xmm1, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_29.0.2
+ movq 16(%rsp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_29.0.2:
+ movq 8(%rsp), %xmm0
+ pextrw $3, %xmm0, %eax
+ cmpl $49136, %eax
+ jne .L_2TAG_PACKET_30.0.2
+ movd %xmm0, %ecx
+ psrlq $20, %xmm0
+ movd %xmm0, %edx
+ orl %edx, %ecx
+ jne .L_2TAG_PACKET_30.0.2
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_30.0.2:
+ movq 16(%rsp), %xmm1
+ andl $32752, %eax
+ subl $16368, %eax
+ pextrw $3, %xmm1, %edx
+ xorpd %xmm0, %xmm0
+ xorl %edx, %eax
+ andl $32768, %eax
+ je .L_2TAG_PACKET_31.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_31.0.2:
+ movl $32752, %ecx
+ pinsrw $3, %ecx, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_32.0.2:
+ movd %xmm1, %eax
+ cmpl $17184, %edx
+ ja .L_2TAG_PACKET_33.0.2
+ testl $1, %eax
+ jne .L_2TAG_PACKET_34.0.2
+ testl $2, %eax
+ je .L_2TAG_PACKET_35.0.2
+ jmp .L_2TAG_PACKET_36.0.2
+.L_2TAG_PACKET_33.0.2:
+ testl $1, %eax
+ je .L_2TAG_PACKET_35.0.2
+ jmp .L_2TAG_PACKET_36.0.2
+.L_2TAG_PACKET_7.0.2:
+ movq 8(%rsp), %xmm2
+ movd %xmm2, %eax
+ psrlq $31, %xmm2
+ movd %xmm2, %ecx
+ orl %ecx, %eax
+ je .L_2TAG_PACKET_9.0.2
+ movq 16(%rsp), %xmm1
+ pextrw $3, %xmm1, %edx
+ movd %xmm1, %eax
+ movq %xmm1, %xmm2
+ psrlq $32, %xmm2
+ movd %xmm2, %ecx
+ addl %ecx, %ecx
+ orl %eax, %ecx
+ je .L_2TAG_PACKET_37.0.2
+ andl $32752, %edx
+ cmpl $32752, %edx
+ je .L_2TAG_PACKET_28.0.2
+ cmpl $17200, %edx
+ ja .L_2TAG_PACKET_35.0.2
+ cmpl $17184, %edx
+ jae .L_2TAG_PACKET_32.0.2
+ cmpl $16368, %edx
+ jb .L_2TAG_PACKET_34.0.2
+ movl $17208, %eax
+ xorpd %xmm2, %xmm2
+ pinsrw $3, %eax, %xmm2
+ movq %xmm2, %xmm4
+ addsd %xmm1, %xmm2
+ subsd %xmm2, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32767, %eax
+ jne .L_2TAG_PACKET_34.0.2
+ movd %xmm2, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_35.0.2
+.L_2TAG_PACKET_36.0.2:
+ xorpd %xmm1, %xmm1
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm1
+ movq LOG2_E(%rip), %xmm2
+ movq 8(%rsp), %xmm4
+ pextrw $3, %xmm4, %eax
+ movl $8192, %edx
+ movd %edx, %xmm4
+ andl $32767, %eax
+ subl $16, %eax
+ jl .L_2TAG_PACKET_10.0.2
+ movl %eax, %edx
+ andl $32752, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ movl $-2147483648, %r8d
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_34.0.2:
+ xorpd %xmm1, %xmm1
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ xorpd %xmm0, %xmm0
+ mulsd %xmm1, %xmm0
+ movl $28, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_35.0.2:
+ xorpd %xmm1, %xmm1
+ movl $30704, %edx
+ pinsrw $3, %edx, %xmm1
+ movq LOG2_E(%rip), %xmm2
+ movq 8(%rsp), %xmm4
+ pextrw $3, %xmm4, %eax
+ movl $8192, %edx
+ movd %edx, %xmm4
+ andl $32767, %eax
+ subl $16, %eax
+ jl .L_2TAG_PACKET_8.0.2
+ movl %eax, %edx
+ andl $32752, %edx
+ subl $16368, %edx
+ movl %edx, %ecx
+ sarl $31, %edx
+ addl %edx, %ecx
+ xorl %edx, %ecx
+ addl $16, %ecx
+ bsr %ecx, %ecx
+ movl $0, %r8d
+ jmp .L_2TAG_PACKET_1.0.2
+.L_2TAG_PACKET_19.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_22.0.2:
+ xorpd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_11.0.2:
+ addl $384, %eax
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_38.0.2
+ mulsd %xmm1, %xmm5
+ addsd %xmm7, %xmm0
+ shrl $31, %r8d
+ addpd %xmm0, %xmm3
+ pshufd $238, %xmm3, %xmm0
+ addsd %xmm0, %xmm3
+ lea log2(%rip), %r11
+ movq (%r11,%r8,8), %xmm4
+ mulsd %xmm3, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ shll $15, %r8d
+ orl %r8d, %eax
+ pinsrw $3, %eax, %xmm0
+ addsd %xmm1, %xmm5
+ mulsd %xmm4, %xmm5
+ addsd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_38.0.2:
+.L_2TAG_PACKET_37.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_39.0.2:
+ xorpd %xmm0, %xmm0
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm0
+ movl $26, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_9.0.2:
+ movq 16(%rsp), %xmm1
+ movq %xmm1, %xmm2
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ jne .L_2TAG_PACKET_40.0.2
+ movd %xmm2, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %edx
+ orl %edx, %eax
+ jne .L_2TAG_PACKET_18.0.2
+.L_2TAG_PACKET_40.0.2:
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ movl %edx, %ecx
+ addl %edx, %edx
+ orl %edx, %eax
+ je .L_2TAG_PACKET_39.0.2
+ shrl $21, %edx
+ cmpl $1075, %edx
+ ja .L_2TAG_PACKET_41.0.2
+ je .L_2TAG_PACKET_42.0.2
+ cmpl $1023, %edx
+ jb .L_2TAG_PACKET_41.0.2
+ movq 16(%rsp), %xmm1
+ movl $17208, %eax
+ xorpd %xmm3, %xmm3
+ pinsrw $3, %eax, %xmm3
+ movq %xmm3, %xmm4
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ pextrw $3, %xmm1, %eax
+ andl $32752, %eax
+ jne .L_2TAG_PACKET_41.0.2
+ movd %xmm3, %eax
+ andl $1, %eax
+ je .L_2TAG_PACKET_41.0.2
+.L_2TAG_PACKET_43.0.2:
+ movq 8(%rsp), %xmm0
+ testl $-2147483648, %ecx
+ jne .L_2TAG_PACKET_44.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_42.0.2:
+ movq 16(%rsp), %xmm1
+ movd %xmm1, %eax
+ testl $1, %eax
+ jne .L_2TAG_PACKET_43.0.2
+.L_2TAG_PACKET_41.0.2:
+ testl $-2147483648, %ecx
+ je .L_2TAG_PACKET_22.0.2
+ xorpd %xmm0, %xmm0
+.L_2TAG_PACKET_44.0.2:
+ movl $16368, %eax
+ xorpd %xmm1, %xmm1
+ pinsrw $3, %eax, %xmm1
+ divsd %xmm0, %xmm1
+ movq %xmm1, %xmm0
+ movl $27, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_12.0.2:
+ movq 8(%rsp), %xmm2
+ movq 16(%rsp), %xmm6
+ pextrw $3, %xmm2, %eax
+ pextrw $3, %xmm6, %edx
+ movl $32752, %ecx
+ andl %edx, %ecx
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_45.0.2
+ andl $32752, %eax
+ subl $16368, %eax
+ xorl %eax, %edx
+ testl $32768, %edx
+ jne .L_2TAG_PACKET_46.0.2
+.L_2TAG_PACKET_47.0.2:
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ shrl $16, %r8d
+ orl %r8d, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+.L_2TAG_PACKET_14.0.2:
+ movl $24, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_46.0.2:
+ movl $16, %eax
+ pinsrw $3, %eax, %xmm0
+ mulsd %xmm0, %xmm0
+ testl $-2147483648, %r8d
+ je .L_2TAG_PACKET_48.0.2
+ movq $0x8000000000000000, %r9
+ movd %r9, %xmm2
+ xorpd %xmm2, %xmm0
+.L_2TAG_PACKET_48.0.2:
+ movl $25, (%rsp)
+ jmp .L_2TAG_PACKET_17.0.2
+.L_2TAG_PACKET_13.0.2:
+ pextrw $3, %xmm5, %ecx
+ pextrw $3, %xmm4, %edx
+ movl $-1, %eax
+ andl $32752, %ecx
+ subl $16368, %ecx
+ andl $32752, %edx
+ addl %ecx, %edx
+ movl $-31, %ecx
+ sarl $4, %edx
+ subl %edx, %ecx
+ jle .L_2TAG_PACKET_49.0.2
+ cmpl $20, %ecx
+ ja .L_2TAG_PACKET_50.0.2
+ shll %cl, %eax
+.L_2TAG_PACKET_49.0.2:
+ movd %eax, %xmm0
+ psllq $32, %xmm0
+ andpd %xmm5, %xmm0
+ subsd %xmm0, %xmm5
+ addsd %xmm1, %xmm5
+ mulsd %xmm4, %xmm0
+ mulsd %xmm4, %xmm5
+ addsd %xmm5, %xmm0
+.L_2TAG_PACKET_50.0.2:
+ jmp .L_2TAG_PACKET_48.0.2
+.L_2TAG_PACKET_2.0.2:
+ movw 22(%rsp), %cx
+ movl $-2147483648, %edx
+ movd %rdx, %xmm1
+ xorpd %xmm7, %xmm7
+ paddd %xmm4, %xmm0
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ paddq %xmm3, %xmm1
+ andpd %xmm1, %xmm5
+ andw $32752, %cx
+ cmpw $16560, %cx
+ jb .L_2TAG_PACKET_3.0.2
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm3
+ addl $16351, %eax
+ shrl $4, %eax
+ subl $1022, %eax
+ cvtsi2sd %eax, %xmm7
+ mulpd %xmm0, %xmm5
+ lea L_tbl(%rip), %r11
+ movq coeff_h(%rip), %xmm4
+ mulsd %xmm0, %xmm3
+ movq coeff_h(%rip), %xmm6
+ subsd %xmm2, %xmm5
+ movq 8+coeff_h(%rip), %xmm1
+ pshufd $68, %xmm3, %xmm2
+ unpcklpd %xmm3, %xmm5
+ addsd %xmm5, %xmm3
+ movq 8+coeff_h(%rip), %xmm0
+ andl $16760832, %edx
+ shrl $10, %edx
+ addpd -3648(%r11,%rdx), %xmm7
+ mulsd %xmm5, %xmm4
+ mulsd %xmm5, %xmm0
+ mulsd %xmm2, %xmm6
+ mulsd %xmm2, %xmm1
+ movq %xmm5, %xmm2
+ mulsd %xmm5, %xmm4
+ addsd %xmm0, %xmm5
+ movq %xmm7, %xmm0
+ addsd %xmm3, %xmm2
+ addsd %xmm5, %xmm7
+ mulsd %xmm2, %xmm6
+ subsd %xmm7, %xmm0
+ movq %xmm7, %xmm2
+ addsd %xmm4, %xmm7
+ addsd %xmm5, %xmm0
+ subsd %xmm7, %xmm2
+ addsd %xmm2, %xmm4
+ pshufd $238, %xmm5, %xmm2
+ movq %xmm7, %xmm5
+ addsd %xmm2, %xmm7
+ addsd %xmm0, %xmm4
+ movapd coeff(%rip), %xmm0
+ subsd %xmm7, %xmm5
+ addsd %xmm4, %xmm6
+ movq %xmm7, %xmm4
+ addsd %xmm2, %xmm5
+ addsd %xmm1, %xmm7
+ movapd 64+coeff(%rip), %xmm2
+ subsd %xmm7, %xmm4
+ addsd %xmm5, %xmm6
+ addsd %xmm1, %xmm4
+ pshufd $238, %xmm7, %xmm5
+ movapd %xmm7, %xmm1
+ addsd %xmm5, %xmm7
+ subsd %xmm7, %xmm1
+ addsd %xmm5, %xmm1
+ movapd 80+coeff(%rip), %xmm5
+ pshufd $68, %xmm3, %xmm3
+ addsd %xmm4, %xmm6
+ addsd %xmm1, %xmm6
+ movapd 32+coeff(%rip), %xmm1
+ mulpd %xmm3, %xmm0
+ mulpd %xmm3, %xmm2
+ pshufd $68, %xmm3, %xmm4
+ mulpd %xmm3, %xmm3
+ addpd %xmm1, %xmm0
+ addpd %xmm2, %xmm5
+ mulsd %xmm3, %xmm4
+ movq HIGHMASK_LOG_X(%rip), %xmm2
+ mulpd %xmm3, %xmm3
+ movq 16(%rsp), %xmm1
+ movw 22(%rsp), %cx
+ mulpd %xmm4, %xmm0
+ pextrw $3, %xmm7, %eax
+ mulpd %xmm4, %xmm5
+ mulpd %xmm3, %xmm0
+ movq 8+HIGHMASK_Y(%rip), %xmm4
+ andpd %xmm7, %xmm2
+ addsd %xmm6, %xmm5
+ subsd %xmm2, %xmm7
+ addpd %xmm0, %xmm5
+ andl $32752, %eax
+ subl $16368, %eax
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ je .L_2TAG_PACKET_45.0.2
+ addl %eax, %ecx
+ cmpl $16576, %ecx
+ jae .L_2TAG_PACKET_51.0.2
+ pshufd $238, %xmm5, %xmm0
+ andpd %xmm1, %xmm4
+ movq %xmm1, %xmm3
+ addsd %xmm0, %xmm5
+ subsd %xmm4, %xmm1
+ xorpd %xmm6, %xmm6
+ movl $17080, %edx
+ pinsrw $3, %edx, %xmm6
+ addsd %xmm5, %xmm7
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm1
+ movq %xmm6, %xmm5
+ mulsd %xmm7, %xmm3
+ addsd %xmm4, %xmm6
+ addsd %xmm3, %xmm1
+ movapd e_coeff(%rip), %xmm7
+ movd %xmm6, %edx
+ subsd %xmm5, %xmm6
+ lea T_exp(%rip), %r11
+ movapd 16+e_coeff(%rip), %xmm3
+ movq 32+e_coeff(%rip), %xmm2
+ subsd %xmm6, %xmm4
+ movl %edx, %ecx
+ andl $255, %edx
+ addl %edx, %edx
+ movapd (%r11,%rdx,8), %xmm5
+ addsd %xmm1, %xmm4
+ pextrw $3, %xmm6, %edx
+ shrl $8, %ecx
+ movl %ecx, %eax
+ shrl $1, %ecx
+ subl %ecx, %eax
+ shll $20, %ecx
+ movd %ecx, %xmm6
+ pshufd $68, %xmm4, %xmm0
+ pshufd $68, %xmm4, %xmm1
+ mulpd %xmm0, %xmm0
+ mulpd %xmm1, %xmm7
+ pshufd $17, %xmm6, %xmm6
+ mulsd %xmm4, %xmm2
+ andl $32767, %edx
+ cmpl $16529, %edx
+ ja .L_2TAG_PACKET_12.0.2
+ mulsd %xmm0, %xmm0
+ paddd %xmm6, %xmm5
+ addpd %xmm7, %xmm3
+ mulsd %xmm5, %xmm2
+ pshufd $238, %xmm5, %xmm6
+ mulpd %xmm3, %xmm0
+ addsd %xmm6, %xmm2
+ pshufd $238, %xmm0, %xmm3
+ addl $1023, %eax
+ shll $20, %eax
+ orl %r8d, %eax
+ movd %eax, %xmm4
+ mulsd %xmm5, %xmm0
+ mulsd %xmm5, %xmm3
+ addsd %xmm2, %xmm0
+ psllq $32, %xmm4
+ addsd %xmm3, %xmm0
+ movq %xmm0, %xmm1
+ addsd %xmm5, %xmm0
+ mulsd %xmm4, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ je .L_2TAG_PACKET_13.0.2
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_14.0.2
+.L_2TAG_PACKET_52.0.2:
+ jmp ..B1.5
+.L_2TAG_PACKET_45.0.2:
+ movq 8(%rsp), %xmm0
+ xorpd %xmm2, %xmm2
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm2
+ addsd %xmm0, %xmm2
+ pextrw $3, %xmm2, %eax
+ cmpl $0, %eax
+ jne .L_2TAG_PACKET_53.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_53.0.2:
+ movq 16(%rsp), %xmm1
+ movd %xmm1, %edx
+ movq %xmm1, %xmm3
+ psrlq $20, %xmm3
+ movd %xmm3, %ecx
+ orl %edx, %ecx
+ je .L_2TAG_PACKET_54.0.2
+ addsd %xmm1, %xmm1
+ movq %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_51.0.2:
+ pextrw $3, %xmm1, %eax
+ pextrw $3, %xmm2, %ecx
+ xorl %ecx, %eax
+ testl $32768, %eax
+ je .L_2TAG_PACKET_47.0.2
+ jmp .L_2TAG_PACKET_46.0.2
+.L_2TAG_PACKET_54.0.2:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ pextrw $3, %xmm1, %edx
+ xorpd %xmm0, %xmm0
+ subl $16368, %eax
+ xorl %edx, %eax
+ testl $32768, %eax
+ je .L_2TAG_PACKET_55.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_55.0.2:
+ movl $32752, %edx
+ pinsrw $3, %edx, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_17.0.2:
+ movq %xmm0, 24(%rsp)
+..B1.3:
+ movq 24(%rsp), %xmm0
+.L_2TAG_PACKET_56.0.2:
+..B1.5:
+ addq $40, %rsp
+..___tag_value_pow.4:
+ ret
+..___tag_value_pow.5:
+END(pow)
+# -- End pow
+ .section .rodata, "a"
+ .align 16
+ .align 16
+HIGHSIGMASK:
+ .long 0
+ .long 4294965248
+ .long 0
+ .long 4294965248
+ .type HIGHSIGMASK,@object
+ .size HIGHSIGMASK,16
+ .align 16
+LOG2_E:
+ .long 0
+ .long 1073160192
+ .long 370913857
+ .long 3210587105
+ .type LOG2_E,@object
+ .size LOG2_E,16
+ .align 16
+coeff:
+ .long 1841914130
+ .long 3213059448
+ .long 3995341938
+ .long 3214607105
+ .long 2677381210
+ .long 3216320731
+ .long 3011779882
+ .long 3218479542
+ .long 1367832035
+ .long 1066403058
+ .long 2894285243
+ .long 1067936923
+ .long 1215221452
+ .long 1069835102
+ .long 370913857
+ .long 3210587105
+ .long 2677381210
+ .long 3216320731
+ .long 4172642429
+ .long 1056068382
+ .long 1215221451
+ .long 1069835102
+ .long 1092638156
+ .long 3184925618
+ .type coeff,@object
+ .size coeff,96
+ .align 16
+L_tbl:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 536870912
+ .long 1072689162
+ .long 2523013013
+ .long 1046157398
+ .long 3758096384
+ .long 1072685081
+ .long 3851513758
+ .long 3190968952
+ .long 0
+ .long 1072681007
+ .long 2241466466
+ .long 1046044599
+ .long 3221225472
+ .long 1072676937
+ .long 2990928271
+ .long 3193084984
+ .long 3758096384
+ .long 1072672873
+ .long 2905112743
+ .long 3192918576
+ .long 1610612736
+ .long 1072668815
+ .long 3370591264
+ .long 1046051793
+ .long 2147483648
+ .long 1072664762
+ .long 3272361216
+ .long 3193793653
+ .long 3758096384
+ .long 1072660714
+ .long 46546755
+ .long 1043206936
+ .long 3221225472
+ .long 1072656672
+ .long 3017067724
+ .long 3192177962
+ .long 0
+ .long 1072652636
+ .long 3688436631
+ .long 3192814956
+ .long 2684354560
+ .long 1072648604
+ .long 1707461992
+ .long 3193056712
+ .long 2684354560
+ .long 1072644578
+ .long 1188114540
+ .long 3193603086
+ .long 3758096384
+ .long 1072640557
+ .long 3533180564
+ .long 1045459375
+ .long 2684354560
+ .long 1072636542
+ .long 2000337630
+ .long 3193475557
+ .long 2684354560
+ .long 1072632532
+ .long 3698062443
+ .long 3193752766
+ .long 3758096384
+ .long 1072628527
+ .long 3161606138
+ .long 3190532995
+ .long 2147483648
+ .long 1072624528
+ .long 3165265478
+ .long 3193158459
+ .long 1610612736
+ .long 1072620534
+ .long 1600940077
+ .long 3193226777
+ .long 2147483648
+ .long 1072616545
+ .long 1363272552
+ .long 3192614278
+ .long 3758096384
+ .long 1072612561
+ .long 3966209910
+ .long 3191249654
+ .long 2147483648
+ .long 1072608583
+ .long 1093672789
+ .long 3190637330
+ .long 1610612736
+ .long 1072604610
+ .long 1735239357
+ .long 3192753616
+ .long 1610612736
+ .long 1072600642
+ .long 1470665156
+ .long 1045559697
+ .long 2684354560
+ .long 1072596679
+ .long 3840624926
+ .long 1045928953
+ .long 536870912
+ .long 1072592722
+ .long 4259072556
+ .long 3191035622
+ .long 3221225472
+ .long 1072588769
+ .long 3613088753
+ .long 3192165681
+ .long 2147483648
+ .long 1072584822
+ .long 3175234446
+ .long 1039486948
+ .long 1610612736
+ .long 1072580880
+ .long 856576441
+ .long 1045702812
+ .long 2147483648
+ .long 1072576943
+ .long 2253498719
+ .long 3193285334
+ .long 2684354560
+ .long 1072573011
+ .long 1587070728
+ .long 3190801577
+ .long 3758096384
+ .long 1072569084
+ .long 159986317
+ .long 1042519436
+ .long 1073741824
+ .long 1072565163
+ .long 3999541949
+ .long 3192020440
+ .long 2684354560
+ .long 1072561246
+ .long 3281310262
+ .long 1045586786
+ .long 536870912
+ .long 1072557335
+ .long 3775179406
+ .long 1045226055
+ .long 3221225472
+ .long 1072553428
+ .long 643472356
+ .long 3193681786
+ .long 1073741824
+ .long 1072549527
+ .long 248169775
+ .long 1045068977
+ .long 3758096384
+ .long 1072545630
+ .long 307016632
+ .long 1042640932
+ .long 2147483648
+ .long 1072541739
+ .long 3872718526
+ .long 3189781486
+ .long 536870912
+ .long 1072537853
+ .long 969711630
+ .long 3191724732
+ .long 3221225472
+ .long 1072533971
+ .long 4018820394
+ .long 3193189264
+ .long 1073741824
+ .long 1072530095
+ .long 3102233092
+ .long 1045510224
+ .long 3758096384
+ .long 1072526223
+ .long 1029307912
+ .long 3193812776
+ .long 1073741824
+ .long 1072522357
+ .long 984083153
+ .long 1045987403
+ .long 3221225472
+ .long 1072518495
+ .long 4171455401
+ .long 3193084080
+ .long 0
+ .long 1072514639
+ .long 2592660757
+ .long 1046121691
+ .long 1073741824
+ .long 1072510787
+ .long 2964365712
+ .long 1046054453
+ .long 2147483648
+ .long 1072506940
+ .long 3792777877
+ .long 3193704729
+ .long 2147483648
+ .long 1072503098
+ .long 2948536104
+ .long 3192467100
+ .long 1610612736
+ .long 1072499261
+ .long 3836005619
+ .long 1041873166
+ .long 536870912
+ .long 1072495429
+ .long 3124543160
+ .long 1044409168
+ .long 3221225472
+ .long 1072491601
+ .long 286227933
+ .long 1041065990
+ .long 1073741824
+ .long 1072487779
+ .long 2111296776
+ .long 3193604419
+ .long 2147483648
+ .long 1072483961
+ .long 2606822001
+ .long 3192940394
+ .long 2147483648
+ .long 1072480148
+ .long 194696800
+ .long 1046026063
+ .long 1610612736
+ .long 1072476340
+ .long 8535452
+ .long 1046200178
+ .long 536870912
+ .long 1072472537
+ .long 950463625
+ .long 3192731897
+ .long 2147483648
+ .long 1072468738
+ .long 973831566
+ .long 1045683197
+ .long 3221225472
+ .long 1072464944
+ .long 3330435892
+ .long 3190277577
+ .long 3221225472
+ .long 1072461155
+ .long 208692097
+ .long 3193517651
+ .long 1610612736
+ .long 1072457371
+ .long 2113097415
+ .long 1044781749
+ .long 3758096384
+ .long 1072453591
+ .long 1088808936
+ .long 3193716142
+ .long 0
+ .long 1072449817
+ .long 1443002127
+ .long 3193250205
+ .long 3221225472
+ .long 1072446046
+ .long 3967357419
+ .long 1046109477
+ .long 1610612736
+ .long 1072442281
+ .long 3013517861
+ .long 3193159691
+ .long 2147483648
+ .long 1072438520
+ .long 2524586286
+ .long 1046121951
+ .long 1610612736
+ .long 1072434764
+ .long 1476892861
+ .long 1046434731
+ .long 0
+ .long 1072431013
+ .long 3089640950
+ .long 3192305780
+ .long 536870912
+ .long 1072427266
+ .long 3812255529
+ .long 1045730879
+ .long 0
+ .long 1072423524
+ .long 995354762
+ .long 3191528673
+ .long 1610612736
+ .long 1072419786
+ .long 3260567684
+ .long 1046273695
+ .long 2147483648
+ .long 1072416053
+ .long 2738210286
+ .long 3191471516
+ .long 536870912
+ .long 1072412325
+ .long 1931849805
+ .long 1044560405
+ .long 1610612736
+ .long 1072408601
+ .long 358896655
+ .long 1044029237
+ .long 1073741824
+ .long 1072404882
+ .long 2214589842
+ .long 3193202126
+ .long 2684354560
+ .long 1072401167
+ .long 3118097363
+ .long 3192592906
+ .long 2147483648
+ .long 1072397457
+ .long 1835998884
+ .long 1045788247
+ .long 0
+ .long 1072393752
+ .long 1585488319
+ .long 1045289910
+ .long 0
+ .long 1072390051
+ .long 480160949
+ .long 1046030455
+ .long 2684354560
+ .long 1072386354
+ .long 1832959667
+ .long 3193013644
+ .long 2684354560
+ .long 1072382662
+ .long 3611346555
+ .long 1044544210
+ .long 1073741824
+ .long 1072378975
+ .long 2749418734
+ .long 3193712580
+ .long 1073741824
+ .long 1072375292
+ .long 2390043472
+ .long 3191710658
+ .long 3221225472
+ .long 1072371613
+ .long 2828199902
+ .long 1042265217
+ .long 3221225472
+ .long 1072367939
+ .long 569209321
+ .long 3191230982
+ .long 536870912
+ .long 1072364270
+ .long 236159139
+ .long 1046240123
+ .long 536870912
+ .long 1072360605
+ .long 1010656270
+ .long 3193813968
+ .long 1610612736
+ .long 1072356944
+ .long 2409080597
+ .long 1044025029
+ .long 536870912
+ .long 1072353288
+ .long 598419513
+ .long 1043327370
+ .long 1073741824
+ .long 1072349636
+ .long 4105950479
+ .long 1045747958
+ .long 3758096384
+ .long 1072345988
+ .long 343243853
+ .long 3192420172
+ .long 3221225472
+ .long 1072342345
+ .long 2088439530
+ .long 1046172091
+ .long 536870912
+ .long 1072338707
+ .long 4117721107
+ .long 1043882496
+ .long 3758096384
+ .long 1072335072
+ .long 3192032958
+ .long 3192998645
+ .long 3758096384
+ .long 1072331442
+ .long 2366522518
+ .long 1045401957
+ .long 1610612736
+ .long 1072327817
+ .long 3685533141
+ .long 3193701947
+ .long 536870912
+ .long 1072324196
+ .long 1058658672
+ .long 3193572492
+ .long 536870912
+ .long 1072320579
+ .long 166346347
+ .long 1045456348
+ .long 2147483648
+ .long 1072316966
+ .long 2027889772
+ .long 1046349302
+ .long 1073741824
+ .long 1072313358
+ .long 1079497888
+ .long 1044585259
+ .long 1073741824
+ .long 1072309754
+ .long 2189851573
+ .long 1045132990
+ .long 2684354560
+ .long 1072306154
+ .long 2486629386
+ .long 3193613625
+ .long 536870912
+ .long 1072302559
+ .long 1263686579
+ .long 1044789259
+ .long 0
+ .long 1072298968
+ .long 2412061798
+ .long 3191369627
+ .long 536870912
+ .long 1072295381
+ .long 584315716
+ .long 3193144135
+ .long 1610612736
+ .long 1072291798
+ .long 449000738
+ .long 1046330451
+ .long 0
+ .long 1072288220
+ .long 3938320157
+ .long 1044446220
+ .long 3758096384
+ .long 1072284645
+ .long 2949844595
+ .long 3193462371
+ .long 3758096384
+ .long 1072281075
+ .long 2771329642
+ .long 3192121593
+ .long 536870912
+ .long 1072277510
+ .long 3971508621
+ .long 3193002806
+ .long 2147483648
+ .long 1072273948
+ .long 4071942301
+ .long 1044952619
+ .long 536870912
+ .long 1072270391
+ .long 2090502395
+ .long 1044660556
+ .long 0
+ .long 1072266838
+ .long 3657520961
+ .long 3193770938
+ .long 3758096384
+ .long 1072263288
+ .long 1608175110
+ .long 1045543239
+ .long 0
+ .long 1072259744
+ .long 2506924180
+ .long 1045530501
+ .long 1073741824
+ .long 1072256203
+ .long 18238493
+ .long 1046305623
+ .long 3221225472
+ .long 1072252666
+ .long 3862640487
+ .long 3192882407
+ .long 1073741824
+ .long 1072249134
+ .long 3850158761
+ .long 1043656099
+ .long 3758096384
+ .long 1072245605
+ .long 2356524356
+ .long 1045915296
+ .long 3221225472
+ .long 1072242081
+ .long 936497287
+ .long 3193842353
+ .long 2147483648
+ .long 1072238561
+ .long 2840845344
+ .long 1046454771
+ .long 2147483648
+ .long 1072235045
+ .long 3688100713
+ .long 1044895451
+ .long 2684354560
+ .long 1072231533
+ .long 479979913
+ .long 3193842442
+ .long 2684354560
+ .long 1072228025
+ .long 1016321898
+ .long 1046251032
+ .long 3758096384
+ .long 1072224521
+ .long 562232474
+ .long 3191974558
+ .long 536870912
+ .long 1072221022
+ .long 3870512029
+ .long 3193113881
+ .long 1610612736
+ .long 1072217526
+ .long 1239780547
+ .long 3191583604
+ .long 2684354560
+ .long 1072214034
+ .long 2815421327
+ .long 1045873682
+ .long 0
+ .long 1072210547
+ .long 2371009561
+ .long 1041508792
+ .long 1610612736
+ .long 1072207063
+ .long 1304636524
+ .long 3192414284
+ .long 3221225472
+ .long 1072203583
+ .long 210144854
+ .long 3193327333
+ .long 0
+ .long 1072200108
+ .long 1454303272
+ .long 1046360024
+ .long 1610612736
+ .long 1072196636
+ .long 2095757548
+ .long 1044984677
+ .long 3221225472
+ .long 1072193168
+ .long 2027215580
+ .long 3192880933
+ .long 0
+ .long 1072189705
+ .long 214794880
+ .long 1043457954
+ .long 1073741824
+ .long 1072186245
+ .long 884624917
+ .long 1043497079
+ .long 2147483648
+ .long 1072182789
+ .long 2792396634
+ .long 3193171685
+ .long 2684354560
+ .long 1072179337
+ .long 4128995250
+ .long 3192103434
+ .long 2684354560
+ .long 1072175889
+ .long 333866043
+ .long 1046372325
+ .long 3221225472
+ .long 1072172445
+ .long 2194445544
+ .long 3193958905
+ .long 2684354560
+ .long 1072169005
+ .long 2316082269
+ .long 3192041703
+ .long 1610612736
+ .long 1072165569
+ .long 581005057
+ .long 1046322848
+ .long 536870912
+ .long 1072162137
+ .long 3280786513
+ .long 1045457251
+ .long 3221225472
+ .long 1072158708
+ .long 2567093361
+ .long 1044710359
+ .long 1073741824
+ .long 1072155284
+ .long 3740443584
+ .long 1044224237
+ .long 2684354560
+ .long 1072151863
+ .long 3981028272
+ .long 1042596351
+ .long 3758096384
+ .long 1072148446
+ .long 3820011120
+ .long 3191915623
+ .long 0
+ .long 1072145034
+ .long 2946439484
+ .long 3193831276
+ .long 3758096384
+ .long 1072141624
+ .long 3075274422
+ .long 3190132432
+ .long 2684354560
+ .long 1072138219
+ .long 496052167
+ .long 1043619760
+ .long 1073741824
+ .long 1072134818
+ .long 271106589
+ .long 3192265149
+ .long 2684354560
+ .long 1072131420
+ .long 2091955684
+ .long 1044443554
+ .long 3758096384
+ .long 1072128026
+ .long 723240109
+ .long 3191007419
+ .long 3758096384
+ .long 1072124636
+ .long 1748629070
+ .long 1044510075
+ .long 3221225472
+ .long 1072121250
+ .long 3289522046
+ .long 3193095178
+ .long 1610612736
+ .long 1072117868
+ .long 3599052146
+ .long 3193720427
+ .long 3221225472
+ .long 1072114489
+ .long 2446758135
+ .long 3193436303
+ .long 3758096384
+ .long 1072111114
+ .long 1652171097
+ .long 3192137173
+ .long 3221225472
+ .long 1072107743
+ .long 1353007155
+ .long 1044523902
+ .long 1610612736
+ .long 1072104376
+ .long 990601105
+ .long 1046296663
+ .long 3758096384
+ .long 1072101012
+ .long 2228627618
+ .long 3193041040
+ .long 0
+ .long 1072097653
+ .long 812484756
+ .long 3191950723
+ .long 3758096384
+ .long 1072094296
+ .long 817833130
+ .long 3192279242
+ .long 2147483648
+ .long 1072090944
+ .long 3563228521
+ .long 3193810951
+ .long 3221225472
+ .long 1072087595
+ .long 2729108859
+ .long 3190936185
+ .long 3221225472
+ .long 1072084250
+ .long 2249121662
+ .long 3190639690
+ .long 2147483648
+ .long 1072080909
+ .long 4082471745
+ .long 3193929368
+ .long 3758096384
+ .long 1072077571
+ .long 2827323806
+ .long 3193708561
+ .long 3758096384
+ .long 1072074237
+ .long 735866167
+ .long 1042434690
+ .long 2684354560
+ .long 1072070907
+ .long 3240808889
+ .long 3191918422
+ .long 0
+ .long 1072067581
+ .long 466482777
+ .long 3186962221
+ .long 0
+ .long 1072064258
+ .long 1576076296
+ .long 1045849056
+ .long 3221225472
+ .long 1072060938
+ .long 2751923560
+ .long 3191910703
+ .long 0
+ .long 1072057623
+ .long 1908755527
+ .long 1046437515
+ .long 0
+ .long 1072054311
+ .long 3175841411
+ .long 1044572886
+ .long 2684354560
+ .long 1072051002
+ .long 1633258450
+ .long 3192670420
+ .long 3221225472
+ .long 1072047697
+ .long 1867746657
+ .long 1045726209
+ .long 2684354560
+ .long 1072044396
+ .long 338968864
+ .long 3193084662
+ .long 0
+ .long 1072041099
+ .long 1501742471
+ .long 3191742031
+ .long 0
+ .long 1072037805
+ .long 4266775786
+ .long 3192686970
+ .long 2147483648
+ .long 1072034514
+ .long 4249283553
+ .long 1045769728
+ .long 2684354560
+ .long 1072031227
+ .long 2758366873
+ .long 1046402161
+ .long 1610612736
+ .long 1072027944
+ .long 2161186990
+ .long 1044736865
+ .long 2684354560
+ .long 1072024664
+ .long 810300171
+ .long 1045748777
+ .long 2147483648
+ .long 1072021388
+ .long 183688927
+ .long 3191515581
+ .long 3758096384
+ .long 1072018115
+ .long 368874072
+ .long 3192363575
+ .long 3221225472
+ .long 1072014846
+ .long 2459092970
+ .long 1041794640
+ .long 536870912
+ .long 1072011581
+ .long 867488640
+ .long 1046310291
+ .long 536870912
+ .long 1072008319
+ .long 50140871
+ .long 1043327329
+ .long 2684354560
+ .long 1072005060
+ .long 1241902518
+ .long 3192739252
+ .long 2684354560
+ .long 1072001805
+ .long 1027881659
+ .long 3193858388
+ .long 0
+ .long 1071998554
+ .long 38457322
+ .long 1045489179
+ .long 0
+ .long 1071995306
+ .long 3432963337
+ .long 3190969347
+ .long 1610612736
+ .long 1071992061
+ .long 534931792
+ .long 1046302734
+ .long 1610612736
+ .long 1071988820
+ .long 1817895268
+ .long 3192551860
+ .long 3221225472
+ .long 1071985582
+ .long 357237383
+ .long 3191870833
+ .long 2684354560
+ .long 1071982348
+ .long 108262401
+ .long 3193365867
+ .long 3758096384
+ .long 1071979117
+ .long 1964729244
+ .long 1042502249
+ .long 2684354560
+ .long 1071975890
+ .long 2088446957
+ .long 1038010503
+ .long 3221225472
+ .long 1071972666
+ .long 2947239447
+ .long 1046377845
+ .long 1610612736
+ .long 1071969446
+ .long 774932072
+ .long 1046064854
+ .long 2147483648
+ .long 1071966229
+ .long 4080937590
+ .long 3193041284
+ .long 3758096384
+ .long 1071963015
+ .long 2208251454
+ .long 1045945089
+ .long 3221225472
+ .long 1071959805
+ .long 2850924475
+ .long 1045650959
+ .long 0
+ .long 1071956599
+ .long 714040997
+ .long 1046275153
+ .long 3221225472
+ .long 1071953395
+ .long 85533782
+ .long 3192816920
+ .long 3221225472
+ .long 1071950195
+ .long 1252511005
+ .long 1044805706
+ .long 1073741824
+ .long 1071946999
+ .long 2384659038
+ .long 3193391602
+ .long 0
+ .long 1071943806
+ .long 416481813
+ .long 1043730233
+ .long 536870912
+ .long 1071940616
+ .long 1675424499
+ .long 1046348030
+ .long 3221225472
+ .long 1071937429
+ .long 1175989513
+ .long 3193009113
+ .long 2684354560
+ .long 1071934246
+ .long 2400084650
+ .long 3192451713
+ .long 3758096384
+ .long 1071931066
+ .long 1467335692
+ .long 3193350868
+ .long 1610612736
+ .long 1071927890
+ .long 266493801
+ .long 1044954481
+ .long 1073741824
+ .long 1071924717
+ .long 3919093445
+ .long 1046023575
+ .long 2147483648
+ .long 1071921547
+ .long 3017408483
+ .long 1044880828
+ .long 536870912
+ .long 1071918381
+ .long 948849966
+ .long 3193892224
+ .long 3758096384
+ .long 1071915217
+ .long 1870232600
+ .long 1045777228
+ .long 536870912
+ .long 1071912058
+ .long 822381492
+ .long 3193639186
+ .long 2147483648
+ .long 1071908901
+ .long 788243705
+ .long 1044966343
+ .long 1073741824
+ .long 1071905748
+ .long 1344278809
+ .long 1044428545
+ .long 1073741824
+ .long 1071902598
+ .long 172864300
+ .long 1045765608
+ .long 2684354560
+ .long 1071899451
+ .long 211555467
+ .long 3192963574
+ .long 536870912
+ .long 1071896308
+ .long 3373438023
+ .long 1045643168
+ .long 0
+ .long 1071893168
+ .long 2867180960
+ .long 3189945998
+ .long 536870912
+ .long 1071890031
+ .long 36724362
+ .long 3193240584
+ .long 1610612736
+ .long 1071886897
+ .long 2140176984
+ .long 1045945349
+ .long 0
+ .long 1071883767
+ .long 436842360
+ .long 1040712587
+ .long 3758096384
+ .long 1071880639
+ .long 1225147329
+ .long 3193814594
+ .long 3758096384
+ .long 1071877515
+ .long 1586157348
+ .long 3191614322
+ .long 536870912
+ .long 1071874395
+ .long 3329332918
+ .long 1041699791
+ .long 2684354560
+ .long 1071871277
+ .long 1635968041
+ .long 3191783756
+ .long 1073741824
+ .long 1071868163
+ .long 2876158382
+ .long 1046097093
+ .long 1073741824
+ .long 1071865052
+ .long 4267556964
+ .long 3193723000
+ .long 1073741824
+ .long 1071861944
+ .long 195475940
+ .long 1045520795
+ .long 2147483648
+ .long 1071858839
+ .long 2239193514
+ .long 1046478675
+ .long 0
+ .long 1071855738
+ .long 4168275596
+ .long 1044926285
+ .long 2684354560
+ .long 1071852639
+ .long 142514114
+ .long 1045595182
+ .long 2147483648
+ .long 1071849544
+ .long 1943457984
+ .long 3192930015
+ .long 2147483648
+ .long 1071846452
+ .long 202659489
+ .long 3193926317
+ .long 2684354560
+ .long 1071843363
+ .long 2208408789
+ .long 3193857484
+ .long 3758096384
+ .long 1071840277
+ .long 2237297552
+ .long 3192939576
+ .long 1073741824
+ .long 1071837195
+ .long 2726920839
+ .long 1044193954
+ .long 3758096384
+ .long 1071834115
+ .long 2337732207
+ .long 3193611773
+ .long 2147483648
+ .long 1071831039
+ .long 1390088602
+ .long 1044000317
+ .long 1610612736
+ .long 1071827966
+ .long 3806188736
+ .long 3193463913
+ .long 1073741824
+ .long 1071824896
+ .long 1795276560
+ .long 1043671965
+ .long 1073741824
+ .long 1071821829
+ .long 2960792799
+ .long 1046240474
+ .long 2147483648
+ .long 1071818765
+ .long 3350591592
+ .long 3193333939
+ .long 3221225472
+ .long 1071815704
+ .long 408870754
+ .long 3193322854
+ .long 0
+ .long 1071812647
+ .long 4146717132
+ .long 1046063520
+ .long 2147483648
+ .long 1071809592
+ .long 1681114919
+ .long 3192114313
+ .long 0
+ .long 1071806541
+ .long 1098393137
+ .long 3190846732
+ .long 2684354560
+ .long 1071803492
+ .long 2437484983
+ .long 3193448718
+ .long 1073741824
+ .long 1071800447
+ .long 1036809185
+ .long 3192023501
+ .long 0
+ .long 1071797405
+ .long 659668848
+ .long 3193596312
+ .long 3221225472
+ .long 1071794365
+ .long 1112062459
+ .long 3192773376
+ .long 2147483648
+ .long 1071791329
+ .long 4082956335
+ .long 1045830513
+ .long 1610612736
+ .long 1071788296
+ .long 2387089965
+ .long 1045532601
+ .long 1610612736
+ .long 1071785266
+ .long 1522101980
+ .long 3193941957
+ .long 1073741824
+ .long 1071782239
+ .long 2157197585
+ .long 3188193305
+ .long 1073741824
+ .long 1071779215
+ .long 946810220
+ .long 3193223819
+ .long 1073741824
+ .long 1071776194
+ .long 4069942444
+ .long 3193878549
+ .long 536870912
+ .long 1071773176
+ .long 1693463440
+ .long 1046360588
+ .long 536870912
+ .long 1071770161
+ .long 1954543254
+ .long 1046409381
+ .long 1073741824
+ .long 1071767149
+ .long 1050471249
+ .long 3193933095
+ .long 536870912
+ .long 1071764140
+ .long 1256240478
+ .long 1046456865
+ .long 536870912
+ .long 1071761134
+ .long 676764254
+ .long 1046055503
+ .long 536870912
+ .long 1071758131
+ .long 1421032967
+ .long 1044779786
+ .long 536870912
+ .long 1071755131
+ .long 38735992
+ .long 3192766355
+ .long 0
+ .long 1071752134
+ .long 2960669690
+ .long 1044484680
+ .long 3758096384
+ .long 1071749139
+ .long 788707382
+ .long 1045299895
+ .long 3221225472
+ .long 1071746148
+ .long 685689300
+ .long 1040778831
+ .long 2147483648
+ .long 1071743160
+ .long 1170994182
+ .long 1046159174
+ .long 1073741824
+ .long 1071740175
+ .long 64591436
+ .long 1046153849
+ .long 0
+ .long 1071737193
+ .long 2338031659
+ .long 3189997702
+ .long 2684354560
+ .long 1071734213
+ .long 1941624568
+ .long 3186752676
+ .long 536870912
+ .long 1071731237
+ .long 1401255580
+ .long 1046383990
+ .long 2684354560
+ .long 1071728263
+ .long 376888427
+ .long 1045896456
+ .long 536870912
+ .long 1071725293
+ .long 2831424639
+ .long 3193539109
+ .long 1610612736
+ .long 1071722325
+ .long 3303123696
+ .long 1044599415
+ .long 2684354560
+ .long 1071719360
+ .long 1077295329
+ .long 3189877372
+ .long 3221225472
+ .long 1071716398
+ .long 1434061099
+ .long 3184529771
+ .long 3221225472
+ .long 1071713439
+ .long 2104991590
+ .long 1045062074
+ .long 3221225472
+ .long 1071710483
+ .long 722060869
+ .long 3193788526
+ .long 536870912
+ .long 1071704580
+ .long 3928796486
+ .long 1046129020
+ .long 536870912
+ .long 1071698688
+ .long 588844628
+ .long 1045492135
+ .long 2684354560
+ .long 1071692807
+ .long 326739366
+ .long 3193004445
+ .long 1610612736
+ .long 1071686938
+ .long 2456436042
+ .long 1046278169
+ .long 2684354560
+ .long 1071681080
+ .long 2831303512
+ .long 1043670046
+ .long 536870912
+ .long 1071675234
+ .long 607223418
+ .long 1045507322
+ .long 0
+ .long 1071669399
+ .long 4254921332
+ .long 3193290483
+ .long 0
+ .long 1071663575
+ .long 914994333
+ .long 3191263853
+ .long 1073741824
+ .long 1071657762
+ .long 4147050180
+ .long 3193228552
+ .long 2684354560
+ .long 1071651960
+ .long 594554157
+ .long 3193503935
+ .long 0
+ .long 1071646170
+ .long 1062846796
+ .long 1045944331
+ .long 1073741824
+ .long 1071636109
+ .long 2909238893
+ .long 3193436884
+ .long 1073741824
+ .long 1071624572
+ .long 1682918119
+ .long 1042211899
+ .long 1073741824
+ .long 1071613057
+ .long 2419209426
+ .long 1045437062
+ .long 1073741824
+ .long 1071601564
+ .long 2951341321
+ .long 3190193214
+ .long 0
+ .long 1071590093
+ .long 3084900875
+ .long 3192394907
+ .long 1073741824
+ .long 1071578643
+ .long 999567454
+ .long 1046433447
+ .long 2147483648
+ .long 1071567215
+ .long 1570101857
+ .long 3193291160
+ .long 0
+ .long 1071555809
+ .long 1080647881
+ .long 3185154585
+ .long 0
+ .long 1071544424
+ .long 3526309177
+ .long 1044843640
+ .long 2147483648
+ .long 1071533060
+ .long 2213463349
+ .long 3191738930
+ .long 1073741824
+ .long 1071521718
+ .long 1039925195
+ .long 3192618353
+ .long 1073741824
+ .long 1071510397
+ .long 2115757280
+ .long 3193671567
+ .long 1073741824
+ .long 1071499097
+ .long 1188751495
+ .long 3191145560
+ .long 2147483648
+ .long 1071487818
+ .long 3983461449
+ .long 3193897029
+ .long 2147483648
+ .long 1071476560
+ .long 782141500
+ .long 1042879962
+ .long 2147483648
+ .long 1071465323
+ .long 4038904626
+ .long 1045063881
+ .long 2147483648
+ .long 1071454107
+ .long 2613036921
+ .long 3193217642
+ .long 0
+ .long 1071442912
+ .long 2095723435
+ .long 1044629175
+ .long 1073741824
+ .long 1071431737
+ .long 3879795974
+ .long 1045767874
+ .long 1073741824
+ .long 1071420583
+ .long 2662198042
+ .long 3191434637
+ .long 3221225472
+ .long 1071409449
+ .long 4037605722
+ .long 3193703090
+ .long 2147483648
+ .long 1071398336
+ .long 1860331835
+ .long 1040814822
+ .long 3221225472
+ .long 1071387243
+ .long 1522972033
+ .long 3190305974
+ .long 1073741824
+ .long 1071376171
+ .long 2361534207
+ .long 1043699366
+ .long 0
+ .long 1071365119
+ .long 4180309179
+ .long 1044142099
+ .long 0
+ .long 1071354087
+ .long 1201038528
+ .long 3192968772
+ .long 0
+ .long 1071343075
+ .long 1342478171
+ .long 3193251215
+ .long 0
+ .long 1071332083
+ .long 3836883348
+ .long 3193472007
+ .long 3221225472
+ .long 1071321110
+ .long 3864874250
+ .long 1045593126
+ .long 2147483648
+ .long 1071310158
+ .long 2169494998
+ .long 1046045346
+ .long 1073741824
+ .long 1071299226
+ .long 3785165075
+ .long 3193319246
+ .long 2147483648
+ .long 1071288313
+ .long 1137692678
+ .long 3192716779
+ .long 1073741824
+ .long 1071277420
+ .long 1752107598
+ .long 1046366120
+ .long 3221225472
+ .long 1071266546
+ .long 1912656912
+ .long 1046352281
+ .long 3221225472
+ .long 1071255692
+ .long 2882676334
+ .long 1046406353
+ .long 1073741824
+ .long 1071244858
+ .long 963612460
+ .long 1045282811
+ .long 0
+ .long 1071234043
+ .long 3811255773
+ .long 1046231636
+ .long 1073741824
+ .long 1071223247
+ .long 1126055989
+ .long 3192224037
+ .long 2147483648
+ .long 1071212470
+ .long 2079145427
+ .long 1044432413
+ .long 0
+ .long 1071201713
+ .long 3611595621
+ .long 1043358745
+ .long 2147483648
+ .long 1071190974
+ .long 390522769
+ .long 1045888252
+ .long 1073741824
+ .long 1071180255
+ .long 4087939723
+ .long 3192930745
+ .long 3221225472
+ .long 1071169554
+ .long 1451494480
+ .long 3190219274
+ .long 1073741824
+ .long 1071158873
+ .long 427176194
+ .long 3193042022
+ .long 2147483648
+ .long 1071148210
+ .long 1882381948
+ .long 3192727946
+ .long 2147483648
+ .long 1071137566
+ .long 3736313771
+ .long 3192087019
+ .long 1073741824
+ .long 1071126941
+ .long 1560398816
+ .long 3193185715
+ .long 2147483648
+ .long 1071116334
+ .long 1021942441
+ .long 1041526696
+ .long 2147483648
+ .long 1071105746
+ .long 3517080249
+ .long 3193576041
+ .long 3221225472
+ .long 1071095176
+ .long 2248589878
+ .long 1044527624
+ .long 2147483648
+ .long 1071084625
+ .long 2412896695
+ .long 1046112867
+ .long 3221225472
+ .long 1071074092
+ .long 3834725738
+ .long 1044562378
+ .long 1073741824
+ .long 1071063578
+ .long 1150920407
+ .long 1043768986
+ .long 0
+ .long 1071053082
+ .long 1379393428
+ .long 3188690690
+ .long 0
+ .long 1071042604
+ .long 3058183278
+ .long 3193617655
+ .long 0
+ .long 1071032144
+ .long 421133665
+ .long 3193417186
+ .long 0
+ .long 1071021702
+ .long 2860161357
+ .long 3191816125
+ .long 0
+ .long 1071011278
+ .long 1742405964
+ .long 1043580240
+ .long 0
+ .long 1071000872
+ .long 2821215927
+ .long 3188984273
+ .long 3221225472
+ .long 1070990483
+ .long 510275597
+ .long 1045813401
+ .long 2147483648
+ .long 1070980113
+ .long 304266588
+ .long 3191193536
+ .long 3221225472
+ .long 1070969760
+ .long 1854784211
+ .long 1046302073
+ .long 0
+ .long 1070959426
+ .long 3773082854
+ .long 3193008899
+ .long 2147483648
+ .long 1070949108
+ .long 3003572392
+ .long 1046404879
+ .long 3221225472
+ .long 1070938808
+ .long 1702149204
+ .long 1046407257
+ .long 2147483648
+ .long 1070928526
+ .long 3935314439
+ .long 1046438280
+ .long 3221225472
+ .long 1070918261
+ .long 2677087609
+ .long 1045501749
+ .long 2147483648
+ .long 1070908014
+ .long 4190598039
+ .long 3193640515
+ .long 1073741824
+ .long 1070897784
+ .long 368874072
+ .long 1044879927
+ .long 2147483648
+ .long 1070887571
+ .long 3584052697
+ .long 3192024662
+ .long 3221225472
+ .long 1070877375
+ .long 3762307829
+ .long 1045886918
+ .long 1073741824
+ .long 1070867197
+ .long 495710920
+ .long 1046317072
+ .long 0
+ .long 1070857036
+ .long 2292768238
+ .long 3190887508
+ .long 3221225472
+ .long 1070846891
+ .long 1044078151
+ .long 3193772914
+ .long 1073741824
+ .long 1070836764
+ .long 3266010457
+ .long 1043443755
+ .long 3221225472
+ .long 1070826653
+ .long 3571665822
+ .long 1045547823
+ .long 1073741824
+ .long 1070816560
+ .long 393348347
+ .long 3190525143
+ .long 2147483648
+ .long 1070806483
+ .long 4241722498
+ .long 3192084193
+ .long 2147483648
+ .long 1070796423
+ .long 1693797068
+ .long 3192807972
+ .long 0
+ .long 1070786380
+ .long 2860086745
+ .long 1046331646
+ .long 2147483648
+ .long 1070776353
+ .long 1366141759
+ .long 3192979363
+ .long 1073741824
+ .long 1070766343
+ .long 737899283
+ .long 1045853346
+ .long 3221225472
+ .long 1070756349
+ .long 88734873
+ .long 1043881257
+ .long 3221225472
+ .long 1070746372
+ .long 1438003315
+ .long 3192917101
+ .long 0
+ .long 1070736412
+ .long 1066505530
+ .long 1043896695
+ .long 3221225472
+ .long 1070726467
+ .long 2706653041
+ .long 3191113643
+ .long 3221225472
+ .long 1070716539
+ .long 1321764476
+ .long 1039573724
+ .long 0
+ .long 1070706628
+ .long 1126753211
+ .long 1044502976
+ .long 2147483648
+ .long 1070696732
+ .long 773642884
+ .long 1044110727
+ .long 1073741824
+ .long 1070686853
+ .long 1263743406
+ .long 3193115278
+ .long 0
+ .long 1070676990
+ .long 3115237732
+ .long 3193089176
+ .long 3221225472
+ .long 1070667142
+ .long 3642626838
+ .long 3191146032
+ .long 2147483648
+ .long 1070657311
+ .long 2091696428
+ .long 1044337177
+ .long 1073741824
+ .long 1070647496
+ .long 3168958391
+ .long 1044197568
+ .long 0
+ .long 1070637697
+ .long 711148669
+ .long 3193181047
+ .long 2147483648
+ .long 1070627913
+ .long 4207182773
+ .long 3193402092
+ .long 3221225472
+ .long 1070618145
+ .long 918070640
+ .long 3192902845
+ .long 3221225472
+ .long 1070608393
+ .long 3135571447
+ .long 3192193928
+ .long 2147483648
+ .long 1070598657
+ .long 1043705517
+ .long 3193188604
+ .long 2147483648
+ .long 1070581777
+ .long 1886680492
+ .long 1043890286
+ .long 2147483648
+ .long 1070562367
+ .long 3373799420
+ .long 3191917802
+ .long 2147483648
+ .long 1070542988
+ .long 2919618025
+ .long 3192461752
+ .long 2147483648
+ .long 1070523640
+ .long 2926365158
+ .long 3193113492
+ .long 0
+ .long 1070504323
+ .long 519978638
+ .long 1045918846
+ .long 0
+ .long 1070485037
+ .long 3665353151
+ .long 3193546248
+ .long 0
+ .long 1070465781
+ .long 2327718958
+ .long 1045050797
+ .long 0
+ .long 1070446556
+ .long 345326861
+ .long 3188224716
+ .long 2147483648
+ .long 1070427361
+ .long 2263747488
+ .long 3192871328
+ .long 0
+ .long 1070408197
+ .long 3894192264
+ .long 1045693123
+ .long 0
+ .long 1070389063
+ .long 994321593
+ .long 1046347203
+ .long 2147483648
+ .long 1070369959
+ .long 3540366700
+ .long 1042296230
+ .long 0
+ .long 1070350886
+ .long 966420752
+ .long 3192400412
+ .long 2147483648
+ .long 1070331842
+ .long 1954511160
+ .long 3193467762
+ .long 2147483648
+ .long 1070312828
+ .long 1875003040
+ .long 1045485629
+ .long 0
+ .long 1070293845
+ .long 4003372005
+ .long 3193714109
+ .long 2147483648
+ .long 1070274890
+ .long 2216083644
+ .long 1045720399
+ .long 0
+ .long 1070255966
+ .long 1240985743
+ .long 1045879414
+ .long 0
+ .long 1070237071
+ .long 1573064162
+ .long 1046427916
+ .long 0
+ .long 1070218206
+ .long 2500166582
+ .long 3193848169
+ .long 2147483648
+ .long 1070199369
+ .long 862131539
+ .long 1045606065
+ .long 0
+ .long 1070180563
+ .long 3733427622
+ .long 3193545988
+ .long 0
+ .long 1070161785
+ .long 124515358
+ .long 1045504766
+ .long 2147483648
+ .long 1070143036
+ .long 689228007
+ .long 1044238436
+ .long 0
+ .long 1070124317
+ .long 976284835
+ .long 3189879978
+ .long 2147483648
+ .long 1070105626
+ .long 2997446224
+ .long 3193394244
+ .long 2147483648
+ .long 1070086964
+ .long 594985163
+ .long 3190453447
+ .long 2147483648
+ .long 1070068331
+ .long 3634411091
+ .long 3193012662
+ .long 0
+ .long 1070049727
+ .long 841316482
+ .long 3192551604
+ .long 0
+ .long 1070031151
+ .long 518949849
+ .long 3189505693
+ .long 2147483648
+ .long 1070012603
+ .long 207633604
+ .long 1043791305
+ .long 2147483648
+ .long 1069994084
+ .long 925415631
+ .long 3189658670
+ .long 2147483648
+ .long 1069975593
+ .long 3348775015
+ .long 1046231055
+ .long 0
+ .long 1069957131
+ .long 4137593961
+ .long 1045760644
+ .long 2147483648
+ .long 1069938696
+ .long 3081207972
+ .long 1046319652
+ .long 2147483648
+ .long 1069920290
+ .long 2912811806
+ .long 3193250863
+ .long 0
+ .long 1069901912
+ .long 1704663230
+ .long 3192651171
+ .long 2147483648
+ .long 1069883561
+ .long 1726887473
+ .long 3193427817
+ .long 2147483648
+ .long 1069865238
+ .long 516302873
+ .long 1042556919
+ .long 2147483648
+ .long 1069846943
+ .long 3737277289
+ .long 3192083505
+ .long 0
+ .long 1069828676
+ .long 2829909067
+ .long 3191628520
+ .long 0
+ .long 1069810436
+ .long 3474800299
+ .long 3187384991
+ .long 2147483648
+ .long 1069792223
+ .long 2041291754
+ .long 3186735048
+ .long 2147483648
+ .long 1069774038
+ .long 3100739290
+ .long 3192991951
+ .long 2147483648
+ .long 1069755880
+ .long 2641686866
+ .long 1042449846
+ .long 0
+ .long 1069737750
+ .long 1353612457
+ .long 3192928544
+ .long 2147483648
+ .long 1069719646
+ .long 1823398190
+ .long 3193125156
+ .long 0
+ .long 1069701570
+ .long 2629108558
+ .long 3192983089
+ .long 2147483648
+ .long 1069683520
+ .long 314889080
+ .long 3193178947
+ .long 2147483648
+ .long 1069665497
+ .long 3426846470
+ .long 1046055034
+ .long 0
+ .long 1069647502
+ .long 2451521798
+ .long 3193081447
+ .long 2147483648
+ .long 1069629532
+ .long 963200030
+ .long 1046315089
+ .long 0
+ .long 1069611590
+ .long 3644976987
+ .long 1046450297
+ .long 2147483648
+ .long 1069593674
+ .long 1514045874
+ .long 3193337489
+ .long 0
+ .long 1069575785
+ .long 2640752615
+ .long 3192734715
+ .long 0
+ .long 1069557922
+ .long 177381730
+ .long 3193107348
+ .long 0
+ .long 1069532650
+ .long 546871269
+ .long 1045601847
+ .long 0
+ .long 1069497029
+ .long 2220408187
+ .long 1045964849
+ .long 0
+ .long 1069461461
+ .long 3101209784
+ .long 3192417098
+ .long 0
+ .long 1069425944
+ .long 3768825782
+ .long 1046196178
+ .long 0
+ .long 1069390480
+ .long 737308942
+ .long 1043872555
+ .long 0
+ .long 1069355068
+ .long 1944808119
+ .long 3193362317
+ .long 0
+ .long 1069319707
+ .long 852406261
+ .long 3191004250
+ .long 0
+ .long 1069284398
+ .long 3202370743
+ .long 3192549796
+ .long 0
+ .long 1069249140
+ .long 900633975
+ .long 1043862575
+ .long 0
+ .long 1069213934
+ .long 3417168564
+ .long 3193213168
+ .long 0
+ .long 1069178778
+ .long 2513309972
+ .long 1046051953
+ .long 0
+ .long 1069143674
+ .long 1836846968
+ .long 1044036653
+ .long 0
+ .long 1069108621
+ .long 675391362
+ .long 3193334972
+ .long 0
+ .long 1069073618
+ .long 1859398086
+ .long 3191668729
+ .long 0
+ .long 1069038666
+ .long 3835994043
+ .long 3193252196
+ .long 0
+ .long 1069003764
+ .long 563337246
+ .long 3192060530
+ .long 0
+ .long 1068968912
+ .long 3715154210
+ .long 1045592716
+ .long 0
+ .long 1068934111
+ .long 51415636
+ .long 3192193939
+ .long 0
+ .long 1068899359
+ .long 822049108
+ .long 1045846080
+ .long 0
+ .long 1068864658
+ .long 3739043340
+ .long 3193184949
+ .long 0
+ .long 1068830006
+ .long 2500828997
+ .long 3193115638
+ .long 0
+ .long 1068795403
+ .long 1479335089
+ .long 1045458233
+ .long 0
+ .long 1068760850
+ .long 1914098598
+ .long 1045079833
+ .long 0
+ .long 1068726346
+ .long 1470374909
+ .long 1046125471
+ .long 0
+ .long 1068691892
+ .long 2048101185
+ .long 3192960024
+ .long 0
+ .long 1068657486
+ .long 801101802
+ .long 1042523454
+ .long 0
+ .long 1068623129
+ .long 412171467
+ .long 1044799425
+ .long 0
+ .long 1068588821
+ .long 2124566049
+ .long 1040459843
+ .long 0
+ .long 1068554561
+ .long 2087558263
+ .long 1046083102
+ .long 0
+ .long 1068520350
+ .long 290389316
+ .long 1045220023
+ .long 0
+ .long 1068473430
+ .long 393737815
+ .long 1045770085
+ .long 0
+ .long 1068405202
+ .long 3273111658
+ .long 3193594336
+ .long 0
+ .long 1068337068
+ .long 3076935419
+ .long 3191993934
+ .long 0
+ .long 1068269030
+ .long 1564279721
+ .long 1040713632
+ .long 0
+ .long 1068201088
+ .long 1950103787
+ .long 3191285473
+ .long 0
+ .long 1068133240
+ .long 111301617
+ .long 1046140470
+ .long 0
+ .long 1068065488
+ .long 2740933659
+ .long 1046091898
+ .long 0
+ .long 1067997832
+ .long 1267131462
+ .long 3192947024
+ .long 0
+ .long 1067930268
+ .long 629787343
+ .long 1045599114
+ .long 0
+ .long 1067862800
+ .long 2943029746
+ .long 3191100621
+ .long 0
+ .long 1067795426
+ .long 2538631151
+ .long 3193953989
+ .long 0
+ .long 1067728144
+ .long 3881795033
+ .long 3191377363
+ .long 0
+ .long 1067660956
+ .long 2752747058
+ .long 3186250103
+ .long 0
+ .long 1067593862
+ .long 892170014
+ .long 3193330390
+ .long 0
+ .long 1067526860
+ .long 2000985783
+ .long 3192968647
+ .long 0
+ .long 1067459950
+ .long 1954077304
+ .long 1044399908
+ .long 0
+ .long 1067335900
+ .long 4120702847
+ .long 3193150730
+ .long 0
+ .long 1067202448
+ .long 353489980
+ .long 1045676744
+ .long 0
+ .long 1067069184
+ .long 2609643324
+ .long 3192108001
+ .long 0
+ .long 1066936100
+ .long 2904433317
+ .long 1044836541
+ .long 0
+ .long 1066803200
+ .long 319656790
+ .long 1044863904
+ .long 0
+ .long 1066670484
+ .long 2407987331
+ .long 3192995083
+ .long 0
+ .long 1066537948
+ .long 2437746120
+ .long 3193127733
+ .long 0
+ .long 1066405592
+ .long 762570215
+ .long 3189946997
+ .long 0
+ .long 1066145040
+ .long 3317159694
+ .long 1046060125
+ .long 0
+ .long 1065881056
+ .long 2317845886
+ .long 3191679176
+ .long 0
+ .long 1065617424
+ .long 3665195816
+ .long 1045633853
+ .long 0
+ .long 1065354160
+ .long 2008730355
+ .long 3193898211
+ .long 0
+ .long 1064829264
+ .long 3746236192
+ .long 1046121471
+ .long 0
+ .long 1064303680
+ .long 885296753
+ .long 3191852441
+ .long 0
+ .long 1063253696
+ .long 449976495
+ .long 3192682663
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .type L_tbl,@object
+ .size L_tbl,8208
+ .space 496, 0x00 # pad
+ .align 16
+HIGHMASK_Y:
+ .long 0
+ .long 4294967288
+ .long 0
+ .long 4294967295
+ .type HIGHMASK_Y,@object
+ .size HIGHMASK_Y,16
+ .align 16
+T_exp:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 997195776
+ .long 4200250559
+ .long 1072696090
+ .long 2808127345
+ .long 3162830514
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 339411585
+ .long 1072701800
+ .long 264588982
+ .long 3162685233
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 772914124
+ .long 1072707540
+ .long 4004372762
+ .long 1013278737
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 1928746161
+ .long 1072713311
+ .long 983617676
+ .long 1015333753
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 238821257
+ .long 1072719114
+ .long 1469694871
+ .long 3163933563
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 728934454
+ .long 1072724948
+ .long 1413842688
+ .long 1015227188
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 4133881824
+ .long 1072730813
+ .long 2148155345
+ .long 3163979875
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 2602514713
+ .long 1072736711
+ .long 2268929336
+ .long 1015402860
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 1172597893
+ .long 1072742641
+ .long 114433263
+ .long 1016396169
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 590962156
+ .long 1072748603
+ .long 3829346666
+ .long 3164324173
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 1608493509
+ .long 1072754597
+ .long 3159622171
+ .long 3163856313
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 685187902
+ .long 1072760624
+ .long 378731989
+ .long 1015891691
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 2875075254
+ .long 1072766683
+ .long 4144233330
+ .long 3164382292
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 351405227
+ .long 1072772776
+ .long 3125337328
+ .long 3160871055
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 2471440686
+ .long 1072778901
+ .long 968836267
+ .long 3163263464
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1416741826
+ .long 1072785060
+ .long 2196380210
+ .long 1012462139
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 2257959872
+ .long 1072791252
+ .long 3802946148
+ .long 1014013503
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 1480023343
+ .long 1072797478
+ .long 2247196168
+ .long 1016376029
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 4162030108
+ .long 1072803737
+ .long 2763428480
+ .long 1016577925
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 2502433899
+ .long 1072810031
+ .long 2148595913
+ .long 1016072567
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 1588871207
+ .long 1072816359
+ .long 143439582
+ .long 3164011992
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2218315341
+ .long 1072822721
+ .long 2694295388
+ .long 3164337444
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 897099801
+ .long 1072829118
+ .long 754756297
+ .long 1016289581
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 2725843665
+ .long 1072835549
+ .long 1433917087
+ .long 1015887099
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 4219606026
+ .long 1072842015
+ .long 2434574742
+ .long 1015730124
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1897844341
+ .long 1072848517
+ .long 1254300460
+ .long 1016324514
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 874372905
+ .long 1072855054
+ .long 100263788
+ .long 1016989308
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 1972484976
+ .long 1072861626
+ .long 675290301
+ .long 3162688626
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 1724976915
+ .long 1072868234
+ .long 420909223
+ .long 3164165955
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 964107055
+ .long 1072874878
+ .long 2800439588
+ .long 3163881797
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 526652809
+ .long 1072881558
+ .long 4223459736
+ .long 1016927951
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 1253935211
+ .long 1072888274
+ .long 1395382931
+ .long 3160751189
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 3991843581
+ .long 1072895026
+ .long 4092853457
+ .long 1015634339
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 1000925746
+ .long 1072901816
+ .long 1018491672
+ .long 3164358120
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1726216749
+ .long 1072908642
+ .long 2466808228
+ .long 3162724981
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 2732492859
+ .long 1072915505
+ .long 2691479646
+ .long 3163304260
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 589198666
+ .long 1072922406
+ .long 2664346172
+ .long 3164206538
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 460407023
+ .long 1072929344
+ .long 4237175092
+ .long 3164187045
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3219942644
+ .long 1072936319
+ .long 3798990616
+ .long 1016417382
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1156440435
+ .long 1072943333
+ .long 2351451249
+ .long 1015015632
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 3743175029
+ .long 1072950384
+ .long 2072812490
+ .long 3163223651
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 3278348324
+ .long 1072957474
+ .long 3069497416
+ .long 1015799288
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 654919306
+ .long 1072964603
+ .long 3232961757
+ .long 3164096045
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1065662932
+ .long 1072971770
+ .long 2533670915
+ .long 1015578814
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 1118294578
+ .long 1072978976
+ .long 2197495694
+ .long 3160957977
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 1720398391
+ .long 1072986221
+ .long 3980678963
+ .long 3164348656
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 3784486610
+ .long 1072993505
+ .long 1581883040
+ .long 3162747529
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3933059031
+ .long 1073000829
+ .long 2133366768
+ .long 3162580408
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 3088564500
+ .long 1073008193
+ .long 1762311517
+ .long 1016094249
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 2178460671
+ .long 1073015597
+ .long 777878098
+ .long 3163891069
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2135241198
+ .long 1073023041
+ .long 1236747871
+ .long 1014637723
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 3896463087
+ .long 1073030525
+ .long 1139797873
+ .long 3162282381
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 4109806887
+ .long 1073038050
+ .long 422403966
+ .long 1015517805
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 3723038930
+ .long 1073045616
+ .long 378465264
+ .long 3163618158
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3689071823
+ .long 1073053223
+ .long 2321004996
+ .long 3163601292
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 671025100
+ .long 1073060872
+ .long 3832014351
+ .long 3164070606
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 4222122499
+ .long 1073068561
+ .long 1277378074
+ .long 3164305313
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 2425981843
+ .long 1073076293
+ .long 2830390851
+ .long 3164395175
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 551349105
+ .long 1073084067
+ .long 3821916050
+ .long 3163155165
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 3872257780
+ .long 1073091882
+ .long 1253592103
+ .long 1017006910
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 488188413
+ .long 1073099741
+ .long 3199821029
+ .long 1016612624
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 4273770423
+ .long 1073107641
+ .long 3383180809
+ .long 3164267477
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3339203574
+ .long 1073115585
+ .long 1483497780
+ .long 3163457330
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 2979960120
+ .long 1073123572
+ .long 2599109725
+ .long 1015547069
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 4201977662
+ .long 1073131602
+ .long 748330254
+ .long 1014642933
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 3721688645
+ .long 1073139676
+ .long 3069276937
+ .long 1016887977
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 2555984613
+ .long 1073147794
+ .long 2652555442
+ .long 3163601268
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 1727278727
+ .long 1073155956
+ .long 3562710623
+ .long 1012520516
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 2263535754
+ .long 1073164162
+ .long 752233586
+ .long 3163687584
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 903334909
+ .long 1073172413
+ .long 1636462108
+ .long 1016088573
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 2980802057
+ .long 1073180708
+ .long 378619896
+ .long 1016821879
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 950803702
+ .long 1073189049
+ .long 1655364926
+ .long 1016285608
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 158781403
+ .long 1073197435
+ .long 2221464712
+ .long 3164335029
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 1660913392
+ .long 1073205866
+ .long 4218599604
+ .long 1016184283
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 2224145553
+ .long 1073214343
+ .long 3482522030
+ .long 3162537745
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2916157145
+ .long 1073222866
+ .long 219487565
+ .long 1016357943
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 515457527
+ .long 1073231436
+ .long 836709333
+ .long 1016699802
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 396319521
+ .long 1073240052
+ .long 4172420816
+ .long 3160123208
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3643909174
+ .long 1073248714
+ .long 3537586109
+ .long 1015403223
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 2759350287
+ .long 1073257424
+ .long 1148526634
+ .long 1016943509
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 3134592888
+ .long 1073266181
+ .long 4232266862
+ .long 1017039710
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 1577608921
+ .long 1073274986
+ .long 1875489510
+ .long 3164016970
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 3492293770
+ .long 1073283838
+ .long 2248032210
+ .long 1016435402
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 1403662306
+ .long 1073292739
+ .long 2788809599
+ .long 3162719583
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 727685349
+ .long 1073301688
+ .long 2038246809
+ .long 3163407318
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2591453363
+ .long 1073310685
+ .long 2132396182
+ .long 3160122774
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 3833209506
+ .long 1073319731
+ .long 2722920684
+ .long 1014803418
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 1297350157
+ .long 1073328827
+ .long 1308022040
+ .long 3164461134
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 424392917
+ .long 1073337972
+ .long 2749202995
+ .long 3163887294
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2366108318
+ .long 1073347166
+ .long 2867985102
+ .long 3162810830
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3985553595
+ .long 1073356410
+ .long 4002146062
+ .long 1016882712
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2152073944
+ .long 1073365705
+ .long 1486860576
+ .long 3164252032
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 2331271250
+ .long 1073375050
+ .long 812057446
+ .long 1013256022
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1405169241
+ .long 1073384446
+ .long 2998539689
+ .long 3163879527
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 557149882
+ .long 1073393893
+ .long 3672720709
+ .long 1015585841
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 977020788
+ .long 1073403391
+ .long 3065100517
+ .long 1016590139
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 3861050111
+ .long 1073412940
+ .long 254893773
+ .long 3163861756
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 1822067026
+ .long 1073422542
+ .long 1241994956
+ .long 1016388866
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 364333489
+ .long 1073432196
+ .long 3923737744
+ .long 3162469949
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 703710506
+ .long 1073441902
+ .long 1384660846
+ .long 1016244467
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 4062661092
+ .long 1073451660
+ .long 1422616006
+ .long 3164303894
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 3080351519
+ .long 1073461472
+ .long 3379126789
+ .long 3158266577
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 3287523847
+ .long 1073471337
+ .long 1625971539
+ .long 3158058531
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 1631695677
+ .long 1073481256
+ .long 2717633076
+ .long 3163392602
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 3657065772
+ .long 1073491228
+ .long 399025623
+ .long 3164005654
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 2029714210
+ .long 1073501255
+ .long 613660079
+ .long 1016147719
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2307442995
+ .long 1073511336
+ .long 3190117721
+ .long 3163453115
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 1464976603
+ .long 1073521472
+ .long 3507292405
+ .long 3163026110
+ .long 3706687593
+ .long 1073526560
+ .long 3521726939
+ .long 1014301643
+ .long 778901109
+ .long 1073531663
+ .long 2248183954
+ .long 3162317327
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1532734324
+ .long 1073541909
+ .long 3094216535
+ .long 3164211433
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 721996136
+ .long 1073552211
+ .long 563754734
+ .long 1016419894
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3939148246
+ .long 1073562568
+ .long 3210352148
+ .long 1016322899
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 3898795731
+ .long 1073572982
+ .long 1249994144
+ .long 1012918394
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 1912561781
+ .long 1073583453
+ .long 3147495102
+ .long 1016726829
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 3594158869
+ .long 1073593980
+ .long 2456521700
+ .long 3164305137
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 1679558232
+ .long 1073604565
+ .long 2390342287
+ .long 3164382546
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 1796832535
+ .long 1073615207
+ .long 3176955716
+ .long 3161634089
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 991358482
+ .long 1073625907
+ .long 838715019
+ .long 3164206244
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 610758006
+ .long 1073636665
+ .long 1965209397
+ .long 3162914808
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2009970496
+ .long 1073647481
+ .long 2159039665
+ .long 3163621524
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 2256325230
+ .long 1073658356
+ .long 580117746
+ .long 1016365871
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 2719515920
+ .long 1073669290
+ .long 2760332941
+ .long 1016186509
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 481706282
+ .long 1073680284
+ .long 1696079173
+ .long 3163759104
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1222472308
+ .long 1073691337
+ .long 1054357470
+ .long 3162069594
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2038973688
+ .long 1073702450
+ .long 892941374
+ .long 1017095035
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 35929225
+ .long 1073713624
+ .long 2809788041
+ .long 3160485544
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 915592468
+ .long 1073724858
+ .long 352947894
+ .long 3162072947
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .long 1797923801
+ .long 1073736153
+ .long 1950547427
+ .long 1014277635
+ .type T_exp,@object
+ .size T_exp,4096
+ .space 512, 0x00 # pad
+ .align 16
+e_coeff:
+ .long 3884607281
+ .long 1062590591
+ .long 3607404736
+ .long 1068264200
+ .long 1874480759
+ .long 1065595563
+ .long 4286760335
+ .long 1070514109
+ .long 4277811695
+ .long 1072049730
+ .long 0
+ .long 0
+ .type e_coeff,@object
+ .size e_coeff,48
+ .align 16
+coeff_h:
+ .long 0
+ .long 3218479616
+ .long 0
+ .long 3210587105
+ .type coeff_h,@object
+ .size coeff_h,16
+ .align 16
+HIGHMASK_LOG_X:
+ .long 4160749568
+ .long 4294967295
+ .long 0
+ .long 4294965248
+ .type HIGHMASK_LOG_X,@object
+ .size HIGHMASK_LOG_X,16
+ .align 8
+HALFMASK:
+ .long 4160749568
+ .long 4294967295
+ .long 4160749568
+ .long 4294967295
+ .type HALFMASK,@object
+ .size HALFMASK,16
+ .align 8
+log2:
+ .long 4277811695
+ .long 1072049730
+ .long 4277811695
+ .long 3219533378
+ .type log2,@object
+ .size log2,16
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_pow.1-.
+ .4byte ..___tag_value_pow.5-..___tag_value_pow.1
+ .2byte 0x0400
+ .4byte ..___tag_value_pow.3-..___tag_value_pow.1
+ .2byte 0x300e
+ .byte 0x04
+ .4byte ..___tag_value_pow.4-..___tag_value_pow.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/e_sinh.S b/libm/x86_64/e_sinh.S
new file mode 100644
index 0000000..4d8db63
--- /dev/null
+++ b/libm/x86_64/e_sinh.S
@@ -0,0 +1,1430 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// sinh(x)=(exp(x)-exp(-x))/2
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^7=int(xH*L2EH*2^7),
+// f=0.b1 b2 ... b7, k integer
+// 2^f is approximated as Tp[f]+Dp[f], and 2^{-f} as Tn[f]+Dn[f]
+// Tp stores the high 53 bits, Dp stores (2^f-Tp[f]) rounded to double precision
+//
+// e^|x|=2^{k+f}*2^r, r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-8}+2^{-14},
+// for |x| in [23/64,3*2^7)
+// e^{-|x|}=2^{-k-f}*2^{-r}
+//
+// e^|x| is approximated as 2^k*Tp+2^k*Tp*c1*r(1+c2*r+..+c5*r^4)+2^k*Dp=
+// =2^k*Tp+2^k*Tp*P15+2^k*Dp
+// e^{-|x|} approximated as 2^{-k}*Tn-2^{-k}*Tn*c1*r(1-c2*r+..+c5*r^4)+2^{-k}*Dn
+//
+// For |x| in [1/8, 3*2^7), sinh(x) is formed as
+// RN(2^k*Tp-2^{-k}*Tn)+2^k*Tp*P15-2^{-k}*Tn*P`15-2^{-k}*TnL-2^{-k}*Dn+2^k*Dp
+//
+// For x in (3*2^7, 3*2^8), sign(x)*(e^|x|)/2 is returned, and
+// the result is checked for overflow.
+//
+// For |x|<23/64, a Taylor polynomial expansion is used (degree 13)
+// To reduce rounding errors, the p3*x^3 term is computed as
+// (p3*xh^3)_high+[(p3*xl*(3*x*xh+xl^2))+(p3*xh^3)_low],
+// where x=xh+xl, (xh are the leading 17 bits of x), and
+// (p3*xh^3)_high=RN(x+p3*xh^3)-x
+// (error bound for polynomial expansion is below 0.51 ulp)
+//
+// Special cases:
+// sinh(NaN) = quiet NaN, and raise invalid exception
+// sinh(+/-INF) = +/-INF
+// sinh(x) = x for subnormals
+// for finite argument, only sinh(0)=0 is exact
+// For IEEE double
+// sinh(x) overflows for x >
+// 710.47586007394386342639336362481117248535156250 = MAXLOG+log(2)
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin sinh
+ENTRY(sinh)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_sinh.1:
+ pushq %rsi
+..___tag_value_sinh.3:
+..B1.2:
+ movsd HALFMASK(%rip), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd L2E(%rip), %xmm1
+ movsd 8+L2E(%rip), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd Shifter(%rip), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ movl $32768, %edx
+ andl %ecx, %edx
+ andl $32767, %ecx
+ subl $16343, %ecx
+ cmpl $177, %ecx
+ jae .L_2TAG_PACKET_0.0.2
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ shll $3, %edx
+ orl %edx, %eax
+ movq %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ xorpd %xmm5, %xmm5
+ subsd %xmm6, %xmm3
+ movapd cv(%rip), %xmm4
+ addsd %xmm1, %xmm2
+ movapd 16+cv(%rip), %xmm6
+ subsd %xmm3, %xmm7
+ movl $32704, %edx
+ pinsrw $3, %edx, %xmm5
+ movapd 32+cv(%rip), %xmm1
+ addsd %xmm7, %xmm2
+ movl $127, %edx
+ andl %eax, %edx
+ addl %edx, %edx
+ shrl $3, %eax
+ andl $65520, %eax
+ addl $16352, %eax
+ xorpd %xmm0, %xmm0
+ cmpl $161, %ecx
+ jae .L_2TAG_PACKET_1.0.2
+ pshufd $68, %xmm5, %xmm5
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ psubw %xmm0, %xmm5
+ lea T2f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm0
+ lea T2_neg_f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm5
+ pshufd $68, %xmm2, %xmm3
+ movapd 48+cv(%rip), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ mulpd %xmm3, %xmm3
+ mulpd %xmm2, %xmm4
+ mulpd %xmm2, %xmm6
+ mulpd 64+cv(%rip), %xmm2
+ mulpd %xmm3, %xmm1
+ mulpd %xmm3, %xmm7
+ mulpd %xmm3, %xmm4
+ mulpd %xmm3, %xmm1
+ addpd %xmm7, %xmm6
+ movq %xmm0, %xmm7
+ addpd %xmm1, %xmm4
+ shufpd $0, %xmm5, %xmm7
+ subpd %xmm5, %xmm0
+ mulpd %xmm7, %xmm2
+ addpd %xmm6, %xmm4
+ subsd %xmm0, %xmm7
+ mulpd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ subsd %xmm5, %xmm7
+ addpd %xmm2, %xmm4
+ addsd %xmm6, %xmm7
+ pshufd $238, %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_1.0.2:
+ subl $16352, %eax
+ movl %eax, %ecx
+ andl $32752, %eax
+ shrl $1, %eax
+ andl $65520, %eax
+ subl %eax, %ecx
+ addl $16352, %eax
+ pinsrw $3, %eax, %xmm0
+ pshufd $68, %xmm0, %xmm0
+ lea T2f(%rip), %r8
+ mulpd (%r8,%rdx,8), %xmm0
+ pshufd $68, %xmm2, %xmm3
+ movsd 48+cv(%rip), %xmm7
+ mulsd %xmm3, %xmm3
+ mulsd %xmm2, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd 64+cv(%rip), %xmm2
+ mulsd %xmm3, %xmm1
+ mulsd %xmm3, %xmm7
+ mulsd %xmm3, %xmm4
+ addl $16368, %ecx
+ pinsrw $3, %ecx, %xmm5
+ mulsd %xmm3, %xmm1
+ addsd %xmm7, %xmm6
+ addsd %xmm1, %xmm4
+ mulsd %xmm0, %xmm2
+ addsd %xmm6, %xmm4
+ mulsd %xmm2, %xmm4
+ pshufd $238, %xmm0, %xmm6
+ addsd %xmm6, %xmm4
+ addsd %xmm4, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm5, %xmm0
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ movl $127, %edx
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_2.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ addl $16343, %ecx
+ cmpl $16343, %ecx
+ ja .L_2TAG_PACKET_3.0.2
+ cmpl $15856, %ecx
+ jb .L_2TAG_PACKET_4.0.2
+ movapd pv(%rip), %xmm1
+ pshufd $68, %xmm0, %xmm6
+ mulpd %xmm5, %xmm5
+ movapd 16+pv(%rip), %xmm2
+ pshufd $68, %xmm0, %xmm7
+ movapd 32+pv(%rip), %xmm3
+ pshufd $68, %xmm0, %xmm4
+ andpd MASK3(%rip), %xmm6
+ mulpd %xmm5, %xmm1
+ mulsd %xmm5, %xmm2
+ subpd %xmm6, %xmm4
+ mulpd %xmm5, %xmm7
+ addpd %xmm3, %xmm1
+ pshufd $68, %xmm6, %xmm3
+ mulpd %xmm5, %xmm5
+ mulsd %xmm7, %xmm2
+ mulpd %xmm7, %xmm1
+ pshufd $68, %xmm0, %xmm7
+ mulsd %xmm6, %xmm6
+ addsd %xmm7, %xmm7
+ mulsd %xmm4, %xmm4
+ mulpd %xmm5, %xmm1
+ addsd %xmm0, %xmm7
+ mulsd %xmm3, %xmm6
+ mulsd %xmm3, %xmm7
+ pshufd $238, %xmm1, %xmm3
+ mulsd %xmm5, %xmm1
+ pshufd $238, %xmm4, %xmm5
+ addsd %xmm2, %xmm3
+ pshufd $238, %xmm2, %xmm2
+ addsd %xmm4, %xmm7
+ movq %xmm0, %xmm4
+ mulsd %xmm2, %xmm6
+ mulsd %xmm5, %xmm7
+ addsd %xmm6, %xmm0
+ mulsd %xmm2, %xmm7
+ subsd %xmm0, %xmm4
+ addsd %xmm7, %xmm1
+ addsd %xmm4, %xmm6
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ cmpl $16, %ecx
+ jae .L_2TAG_PACKET_5.0.2
+ movq %xmm0, %xmm1
+ mulsd %xmm1, %xmm1
+ jmp ..B1.5
+.L_2TAG_PACKET_5.0.2:
+ xorpd %xmm2, %xmm2
+ movl $17392, %ecx
+ pinsrw $3, %ecx, %xmm2
+ xorpd %xmm3, %xmm3
+ movl $15344, %edx
+ pinsrw $3, %edx, %xmm3
+ mulsd %xmm0, %xmm2
+ addsd %xmm2, %xmm0
+ mulsd %xmm3, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_3.0.2:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ xorpd %xmm0, %xmm0
+ movl $32736, %eax
+ pinsrw $3, %eax, %xmm0
+ orl %edx, %eax
+ pinsrw $3, %eax, %xmm1
+ mulsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_2.0.2
+.L_2TAG_PACKET_6.0.2:
+ xorpd %xmm1, %xmm1
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm1
+ andnpd %xmm0, %xmm1
+ mulsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ movq %xmm0, (%rsp)
+..B1.3:
+ movq (%rsp), %xmm0
+.L_2TAG_PACKET_7.0.2:
+..B1.5:
+ popq %rcx
+..___tag_value_sinh.4:
+ ret
+..___tag_value_sinh.5:
+END(sinh)
+# -- End sinh
+ .section .rodata, "a"
+ .align 16
+ .align 16
+L2E:
+ .long 1610612736
+ .long 1080497479
+ .long 4166901572
+ .long 1053077003
+ .type L2E,@object
+ .size L2E,16
+ .align 16
+Shifter:
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .type Shifter,@object
+ .size Shifter,16
+ .align 16
+cv:
+ .long 3607404736
+ .long 1044146952
+ .long 3607404736
+ .long 3191630600
+ .long 4277811695
+ .long 1063661122
+ .long 4277811695
+ .long 3211144770
+ .long 2140175755
+ .long 1033864261
+ .long 2140175755
+ .long 1033864261
+ .long 4289495988
+ .long 1054113747
+ .long 4289495988
+ .long 1054113747
+ .long 4277811695
+ .long 1064709698
+ .long 4277811695
+ .long 1064709698
+ .type cv,@object
+ .size cv,80
+ .align 16
+T2f:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 2851812149
+ .long 1072698941
+ .long 2595802551
+ .long 1016815913
+ .long 1048019041
+ .long 1072704666
+ .long 1398474845
+ .long 3161559171
+ .long 3899555717
+ .long 1072710421
+ .long 427280750
+ .long 3163595548
+ .long 3541402996
+ .long 1072716208
+ .long 2759177317
+ .long 1015903202
+ .long 702412510
+ .long 1072722027
+ .long 3803266087
+ .long 3163328991
+ .long 410360776
+ .long 1072727877
+ .long 1269990655
+ .long 1013024446
+ .long 3402036099
+ .long 1072733758
+ .long 405889334
+ .long 1016154232
+ .long 1828292879
+ .long 1072739672
+ .long 1255956747
+ .long 1016636974
+ .long 728909815
+ .long 1072745618
+ .long 383930225
+ .long 1016078044
+ .long 852742562
+ .long 1072751596
+ .long 667253586
+ .long 1010842135
+ .long 2952712987
+ .long 1072757606
+ .long 3293494651
+ .long 3161168877
+ .long 3490863953
+ .long 1072763649
+ .long 960797498
+ .long 3163997456
+ .long 3228316108
+ .long 1072769725
+ .long 3010241991
+ .long 3159471380
+ .long 2930322912
+ .long 1072775834
+ .long 2599499422
+ .long 3163762623
+ .long 3366293073
+ .long 1072781976
+ .long 3119426314
+ .long 1015169130
+ .long 1014845819
+ .long 1072788152
+ .long 3117910646
+ .long 3162607681
+ .long 948735466
+ .long 1072794361
+ .long 3516338028
+ .long 3163623459
+ .long 3949972341
+ .long 1072800603
+ .long 2068408548
+ .long 1015962444
+ .long 2214878420
+ .long 1072806880
+ .long 892270087
+ .long 3164164998
+ .long 828946858
+ .long 1072813191
+ .long 10642492
+ .long 1016988014
+ .long 586995997
+ .long 1072819536
+ .long 41662348
+ .long 3163676568
+ .long 2288159958
+ .long 1072825915
+ .long 2169144469
+ .long 1015924597
+ .long 2440944790
+ .long 1072832329
+ .long 2492769774
+ .long 1015196030
+ .long 1853186616
+ .long 1072838778
+ .long 3066496371
+ .long 1016705150
+ .long 1337108031
+ .long 1072845262
+ .long 3203724452
+ .long 1015726421
+ .long 1709341917
+ .long 1072851781
+ .long 2571168217
+ .long 1015201075
+ .long 3790955393
+ .long 1072858335
+ .long 2352942462
+ .long 3164228666
+ .long 4112506593
+ .long 1072864925
+ .long 2947355221
+ .long 1015419624
+ .long 3504003472
+ .long 1072871551
+ .long 3594001060
+ .long 3158379228
+ .long 2799960843
+ .long 1072878213
+ .long 1423655381
+ .long 1016070727
+ .long 2839424854
+ .long 1072884911
+ .long 1171596163
+ .long 1014090255
+ .long 171030293
+ .long 1072891646
+ .long 3526460132
+ .long 1015477354
+ .long 4232894513
+ .long 1072898416
+ .long 2383938684
+ .long 1015717095
+ .long 2992903935
+ .long 1072905224
+ .long 2218154406
+ .long 1016276769
+ .long 1603444721
+ .long 1072912069
+ .long 1548633640
+ .long 3163249902
+ .long 926591435
+ .long 1072918951
+ .long 3208833762
+ .long 3163962090
+ .long 1829099622
+ .long 1072925870
+ .long 1016661181
+ .long 3164509581
+ .long 887463927
+ .long 1072932827
+ .long 3596744163
+ .long 3161842742
+ .long 3272845541
+ .long 1072939821
+ .long 928852419
+ .long 3164536824
+ .long 1276261410
+ .long 1072946854
+ .long 300981948
+ .long 1015732745
+ .long 78413852
+ .long 1072953925
+ .long 4183226867
+ .long 3164065827
+ .long 569847338
+ .long 1072961034
+ .long 472945272
+ .long 3160339305
+ .long 3645941911
+ .long 1072968181
+ .long 3814685081
+ .long 3162621917
+ .long 1617004845
+ .long 1072975368
+ .long 82804944
+ .long 1011391354
+ .long 3978100823
+ .long 1072982593
+ .long 3513027190
+ .long 1016894539
+ .long 3049340112
+ .long 1072989858
+ .long 3062915824
+ .long 1014219171
+ .long 4040676318
+ .long 1072997162
+ .long 4090609238
+ .long 1016712034
+ .long 3577096743
+ .long 1073004506
+ .long 2951496418
+ .long 1014842263
+ .long 2583551245
+ .long 1073011890
+ .long 3161094195
+ .long 1016655067
+ .long 1990012071
+ .long 1073019314
+ .long 3529070563
+ .long 3163861769
+ .long 2731501122
+ .long 1073026778
+ .long 1774031855
+ .long 3163518597
+ .long 1453150082
+ .long 1073034283
+ .long 498154669
+ .long 3162536638
+ .long 3395129871
+ .long 1073041828
+ .long 4025345435
+ .long 3163383964
+ .long 917841882
+ .long 1073049415
+ .long 18715565
+ .long 1016707884
+ .long 3566716925
+ .long 1073057042
+ .long 1536826856
+ .long 1015191009
+ .long 3712504873
+ .long 1073064711
+ .long 88491949
+ .long 1016476236
+ .long 2321106615
+ .long 1073072422
+ .long 2171176610
+ .long 1010584347
+ .long 363667784
+ .long 1073080175
+ .long 813753950
+ .long 1016833785
+ .long 3111574537
+ .long 1073087969
+ .long 2606161479
+ .long 3163808322
+ .long 2956612997
+ .long 1073095806
+ .long 2118169751
+ .long 3163784129
+ .long 885834528
+ .long 1073103686
+ .long 1973258547
+ .long 3163310140
+ .long 2186617381
+ .long 1073111608
+ .long 2270764084
+ .long 3164321289
+ .long 3561793907
+ .long 1073119573
+ .long 1157054053
+ .long 1012938926
+ .long 1719614413
+ .long 1073127582
+ .long 330458198
+ .long 3164331316
+ .long 1963711167
+ .long 1073135634
+ .long 1744767757
+ .long 3161622870
+ .long 1013258799
+ .long 1073143730
+ .long 1748797611
+ .long 3161177658
+ .long 4182873220
+ .long 1073151869
+ .long 629542646
+ .long 3163044879
+ .long 3907805044
+ .long 1073160053
+ .long 2257091225
+ .long 3162598983
+ .long 1218806132
+ .long 1073168282
+ .long 1818613052
+ .long 3163597017
+ .long 1447192521
+ .long 1073176555
+ .long 1462857171
+ .long 3163563097
+ .long 1339972927
+ .long 1073184873
+ .long 167908909
+ .long 1016620728
+ .long 1944781191
+ .long 1073193236
+ .long 3993278767
+ .long 3162772855
+ .long 19972402
+ .long 1073201645
+ .long 3507899862
+ .long 1017057868
+ .long 919555682
+ .long 1073210099
+ .long 3121969534
+ .long 1013996802
+ .long 1413356050
+ .long 1073218599
+ .long 1651349291
+ .long 3163716742
+ .long 2571947539
+ .long 1073227145
+ .long 3558159064
+ .long 3164425245
+ .long 1176749997
+ .long 1073235738
+ .long 2738998779
+ .long 3163084420
+ .long 2604962541
+ .long 1073244377
+ .long 2614425274
+ .long 3164587768
+ .long 3649726105
+ .long 1073253063
+ .long 4085036346
+ .long 1016698050
+ .long 1110089947
+ .long 1073261797
+ .long 1451641639
+ .long 1016523249
+ .long 380978316
+ .long 1073270578
+ .long 854188970
+ .long 3161511262
+ .long 2568320822
+ .long 1073279406
+ .long 2732824428
+ .long 1015401491
+ .long 194117574
+ .long 1073288283
+ .long 777528612
+ .long 3164460665
+ .long 2966275557
+ .long 1073297207
+ .long 2176155324
+ .long 3160891335
+ .long 3418903055
+ .long 1073306180
+ .long 2527457337
+ .long 3161869180
+ .long 2682146384
+ .long 1073315202
+ .long 2082178513
+ .long 3164411995
+ .long 1892288442
+ .long 1073324273
+ .long 2446255666
+ .long 3163648957
+ .long 2191782032
+ .long 1073333393
+ .long 2960257726
+ .long 1014791238
+ .long 434316067
+ .long 1073342563
+ .long 2028358766
+ .long 1014506698
+ .long 2069751141
+ .long 1073351782
+ .long 1562170675
+ .long 3163773257
+ .long 3964284211
+ .long 1073361051
+ .long 2111583915
+ .long 1016475740
+ .long 2990417245
+ .long 1073370371
+ .long 3683467745
+ .long 3164417902
+ .long 321958744
+ .long 1073379742
+ .long 3401933767
+ .long 1016843134
+ .long 1434058175
+ .long 1073389163
+ .long 251133233
+ .long 1016134345
+ .long 3218338682
+ .long 1073398635
+ .long 3404164304
+ .long 3163525684
+ .long 2572866477
+ .long 1073408159
+ .long 878562433
+ .long 1016570317
+ .long 697153126
+ .long 1073417735
+ .long 1283515429
+ .long 3164331765
+ .long 3092190715
+ .long 1073427362
+ .long 814012168
+ .long 3160571998
+ .long 2380618042
+ .long 1073437042
+ .long 3149557219
+ .long 3164369375
+ .long 4076559943
+ .long 1073446774
+ .long 2119478331
+ .long 3161806927
+ .long 815859274
+ .long 1073456560
+ .long 240396590
+ .long 3164536019
+ .long 2420883922
+ .long 1073466398
+ .long 2049810052
+ .long 1015168464
+ .long 1540824585
+ .long 1073476290
+ .long 1064017011
+ .long 3164536266
+ .long 3716502172
+ .long 1073486235
+ .long 2303740125
+ .long 1015091301
+ .long 1610600570
+ .long 1073496235
+ .long 3766732298
+ .long 1016808759
+ .long 777507147
+ .long 1073506289
+ .long 4282924205
+ .long 1016236109
+ .long 2483480501
+ .long 1073516397
+ .long 1216371780
+ .long 1014082748
+ .long 3706687593
+ .long 1073526560
+ .long 3521726940
+ .long 1014301643
+ .long 1432208378
+ .long 1073536779
+ .long 1401068914
+ .long 3163412539
+ .long 1242007932
+ .long 1073547053
+ .long 1132034716
+ .long 3164388407
+ .long 135105010
+ .long 1073557383
+ .long 1906148728
+ .long 3164424315
+ .long 3707479175
+ .long 1073567768
+ .long 3613079303
+ .long 1015213314
+ .long 382305176
+ .long 1073578211
+ .long 2347622376
+ .long 3163627201
+ .long 64696965
+ .long 1073588710
+ .long 1768797490
+ .long 1016865536
+ .long 4076975200
+ .long 1073599265
+ .long 2029000899
+ .long 1016257111
+ .long 863738719
+ .long 1073609879
+ .long 1326992220
+ .long 3163661773
+ .long 351641897
+ .long 1073620550
+ .long 2172261526
+ .long 3164059175
+ .long 3884662774
+ .long 1073631278
+ .long 2158611599
+ .long 1015258761
+ .long 4224142467
+ .long 1073642065
+ .long 3389820386
+ .long 1016255778
+ .long 2728693978
+ .long 1073652911
+ .long 396109971
+ .long 3164511267
+ .long 764307441
+ .long 1073663816
+ .long 3021057420
+ .long 3164378099
+ .long 3999357479
+ .long 1073674779
+ .long 2258941616
+ .long 1016973300
+ .long 929806999
+ .long 1073685803
+ .long 3205336643
+ .long 1016308133
+ .long 1533953344
+ .long 1073696886
+ .long 769171851
+ .long 1016714209
+ .long 2912730644
+ .long 1073708029
+ .long 3490067722
+ .long 3164453650
+ .long 2174652632
+ .long 1073719233
+ .long 4087714590
+ .long 1015498835
+ .long 730821105
+ .long 1073730498
+ .long 2523232743
+ .long 1013115764
+ .type T2f,@object
+ .size T2f,2048
+ .align 16
+T2_neg_f:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .type T2_neg_f,@object
+ .size T2_neg_f,2048
+ .align 16
+pv:
+ .long 329805064
+ .long 1038488134
+ .long 2773927730
+ .long 1053236707
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1069897045
+ .long 1744127201
+ .long 1046144581
+ .long 436314137
+ .long 1059717536
+ .type pv,@object
+ .size pv,48
+ .align 16
+MASK3:
+ .long 0
+ .long 4294967280
+ .long 0
+ .long 4294967280
+ .type MASK3,@object
+ .size MASK3,16
+ .align 8
+HALFMASK:
+ .long 4160749568
+ .long 2147483647
+ .type HALFMASK,@object
+ .size HALFMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_sinh.1-.
+ .4byte ..___tag_value_sinh.5-..___tag_value_sinh.1
+ .2byte 0x0400
+ .4byte ..___tag_value_sinh.3-..___tag_value_sinh.1
+ .2byte 0x100e
+ .byte 0x04
+ .4byte ..___tag_value_sinh.4-..___tag_value_sinh.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/floor.S b/libm/x86_64/floor.S
new file mode 100644
index 0000000..dc80e88
--- /dev/null
+++ b/libm/x86_64/floor.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(floor)
+roundsd $0x1,%xmm0,%xmm0
+retq
+END(floor)
diff --git a/libm/x86_64/floorf.S b/libm/x86_64/floorf.S
new file mode 100644
index 0000000..832f9c5
--- /dev/null
+++ b/libm/x86_64/floorf.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(floorf)
+roundss $0x1,%xmm0,%xmm0
+retq
+END(floorf)
diff --git a/libm/x86_64/s_atan.S b/libm/x86_64/s_atan.S
new file mode 100644
index 0000000..2453e10
--- /dev/null
+++ b/libm/x86_64/s_atan.S
@@ -0,0 +1,927 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// This implementation uses the main path for |x| in [2^{-5},2^65).
+// For |x| in [2^{-64},2^{-5}), a secondary path is used.
+// For the biased exponent of X within 3FFH-64 and 3FF+64, we use one branch.
+// We use the following definition of B and X` so that the formula
+// atan(X) = Tau + atan( (X`-B) / (One + BX) ) is correct
+//
+// X = (-1)^s * 2^k * 1. x1 x2 ... x52
+//
+// Define X` = 0 if k >= 5; and X` = |X| otherwise
+// Define One = 0 if k >= 5; and One = 1 otherwise
+// Define B = 0 if k <= -6; B = 2^k * 1.x1 x2 x3 x4 1 if -5 <= k <= 4
+// Define B = 2^5 * 1.0 0 ... 0 if k >= 5
+//
+// Tau is 0 if k <= -6;
+// Tau is atan( B ) if -5 <= k <= 4
+// Tau is pi/2 if k >= 5
+//
+// Special cases:
+// atan(NaN) = quiet NaN
+// atan(+/-INF) = +/-Pi/2
+// atan(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin atan
+ENTRY(atan)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_atan.1:
+ pushq %rsi
+..___tag_value_atan.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ movq $0xffff000000000000, %r8
+ movd %r8, %xmm3
+ movq ONEMASK(%rip), %xmm5
+ movq $0x800000000000, %r9
+ movd %r9, %xmm4
+ pextrw $3, %xmm0, %edx
+ andpd %xmm0, %xmm3
+ pshufd $68, %xmm0, %xmm1
+ orpd %xmm4, %xmm3
+ movl %edx, %eax
+ andl $32767, %edx
+ subl $16288, %edx
+ cmpl $159, %edx
+ ja .L_2TAG_PACKET_0.0.1
+ mulsd %xmm3, %xmm1
+ subsd %xmm3, %xmm0
+ addsd %xmm5, %xmm1
+ divsd %xmm1, %xmm0
+ addl $1, %edx
+ movq a2(%rip), %xmm2
+ movq b2(%rip), %xmm4
+ andl $32768, %eax
+ xorpd %xmm7, %xmm7
+ pinsrw $3, %eax, %xmm7
+ addl %edx, %edx
+ lea atan_tbl(%rip), %r8
+ movq (%r8,%rdx,8), %xmm6
+ movq 8(%r8,%rdx,8), %xmm5
+ xorpd %xmm7, %xmm5
+ xorpd %xmm7, %xmm6
+ movq 8+a2(%rip), %xmm7
+ movddup %xmm0, %xmm1
+ mulsd %xmm0, %xmm0
+ movddup %xmm1, %xmm3
+ addsd %xmm6, %xmm1
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm4
+ subsd %xmm1, %xmm6
+ mulsd %xmm0, %xmm4
+ addsd %xmm7, %xmm2
+ mulsd %xmm3, %xmm0
+ addsd %xmm3, %xmm6
+ mulsd %xmm2, %xmm0
+ addsd 8+b2(%rip), %xmm4
+ addsd %xmm5, %xmm6
+ mulsd %xmm4, %xmm0
+ addsd %xmm6, %xmm0
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_1.0.1
+.L_2TAG_PACKET_0.0.1:
+ addl $944, %edx
+ cmpl $1103, %edx
+ ja .L_2TAG_PACKET_2.0.1
+ movq a2(%rip), %xmm4
+ movq b2(%rip), %xmm7
+ movq (%rsp), %xmm0
+ mulsd %xmm1, %xmm1
+ movq 8+a2(%rip), %xmm2
+ movq 8+b2(%rip), %xmm5
+ mulsd %xmm1, %xmm4
+ addsd %xmm1, %xmm7
+ movq %xmm1, %xmm6
+ mulsd %xmm0, %xmm1
+ addsd %xmm4, %xmm2
+ mulsd %xmm6, %xmm7
+ mulsd %xmm1, %xmm2
+ addsd %xmm5, %xmm7
+ mulsd %xmm7, %xmm2
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_1.0.1
+.L_2TAG_PACKET_2.0.1:
+ addl $15344, %edx
+ cmpl $16368, %edx
+ ja .L_2TAG_PACKET_3.0.1
+ movq (%rsp), %xmm0
+ movq (%rsp), %xmm1
+ cmpl $16, %edx
+ jae .L_2TAG_PACKET_1.0.1
+ mulsd %xmm0, %xmm1
+ jmp .L_2TAG_PACKET_1.0.1
+.L_2TAG_PACKET_3.0.1:
+ cmpl $17392, %edx
+ jae .L_2TAG_PACKET_4.0.1
+ movq $0xbff0000000000000, %r8
+ movd %r8, %xmm1
+ divsd %xmm0, %xmm1
+ movq a2(%rip), %xmm2
+ movq b2(%rip), %xmm4
+ andl $32768, %eax
+ xorpd %xmm7, %xmm7
+ pinsrw $3, %eax, %xmm7
+ addl %edx, %edx
+ movq pi_table(%rip), %xmm6
+ movq 8+pi_table(%rip), %xmm5
+ xorpd %xmm7, %xmm5
+ xorpd %xmm7, %xmm6
+ movq 8+a2(%rip), %xmm7
+ movddup %xmm1, %xmm0
+ mulsd %xmm1, %xmm1
+ movddup %xmm0, %xmm3
+ addsd %xmm6, %xmm0
+ mulsd %xmm1, %xmm2
+ addsd %xmm1, %xmm4
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm4
+ addsd %xmm7, %xmm2
+ mulsd %xmm3, %xmm1
+ addsd %xmm3, %xmm6
+ mulsd %xmm2, %xmm1
+ addsd 8+b2(%rip), %xmm4
+ addsd %xmm5, %xmm6
+ mulsd %xmm4, %xmm1
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_1.0.1
+.L_2TAG_PACKET_4.0.1:
+ movq (%rsp), %xmm4
+ movq SGNMASK(%rip), %xmm0
+ movq pi_table(%rip), %xmm2
+ movq 8+pi_table(%rip), %xmm3
+ movd %xmm1, %eax
+ psrlq $32, %xmm1
+ movd %xmm1, %edx
+ andl $2147483647, %edx
+ cmpl $2146435072, %edx
+ jae .L_2TAG_PACKET_5.0.1
+.L_2TAG_PACKET_6.0.1:
+ andnpd %xmm4, %xmm0
+ orpd %xmm0, %xmm2
+ orpd %xmm3, %xmm0
+ addsd %xmm2, %xmm0
+ jmp .L_2TAG_PACKET_1.0.1
+.L_2TAG_PACKET_5.0.1:
+ subl $2146435072, %edx
+ orl %edx, %eax
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_6.0.1
+ movq %xmm4, %xmm0
+ addsd %xmm0, %xmm0
+.L_2TAG_PACKET_1.0.1:
+..B1.3:
+ popq %rcx
+..___tag_value_atan.4:
+ ret
+..___tag_value_atan.5:
+END(atan)
+# -- End atan
+ .section .rodata, "a"
+ .align 4
+ .align 4
+ONEMASK:
+ .long 0
+ .long 1072693248
+ .type ONEMASK,@object
+ .size ONEMASK,8
+ .align 4
+a2:
+ .long 2006262985
+ .long 1069310863
+ .long 2358449471
+ .long 3217342131
+ .type a2,@object
+ .size a2,16
+ .align 4
+b2:
+ .long 3845454352
+ .long 1069952297
+ .long 2829679149
+ .long 1073771565
+ .type b2,@object
+ .size b2,16
+ .align 4
+atan_tbl:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3819695742
+ .long 1067482761
+ .long 2398680355
+ .long 3155462074
+ .long 2998791009
+ .long 1067548225
+ .long 3868465248
+ .long 3157182472
+ .long 3339424991
+ .long 1067613680
+ .long 3296670360
+ .long 1010752543
+ .long 2710002256
+ .long 1067679126
+ .long 3403896007
+ .long 1010910768
+ .long 3275701428
+ .long 1067744562
+ .long 119959933
+ .long 1011482843
+ .long 2908636881
+ .long 1067809988
+ .long 2464489612
+ .long 1011545526
+ .long 3777889398
+ .long 1067875403
+ .long 3262682165
+ .long 1009703919
+ .long 3759667419
+ .long 1067940807
+ .long 1838130851
+ .long 3157373556
+ .long 732369940
+ .long 1068006200
+ .long 1203428313
+ .long 1010055371
+ .long 1166616461
+ .long 1068071580
+ .long 2901274051
+ .long 3158549977
+ .long 2945472892
+ .long 1068136947
+ .long 3726120658
+ .long 1009762715
+ .long 3954480976
+ .long 1068202301
+ .long 1289173457
+ .long 1009429861
+ .long 2081752829
+ .long 1068267642
+ .long 1836909874
+ .long 1006212095
+ .long 3807999788
+ .long 1068332968
+ .long 2172459940
+ .long 3156162078
+ .long 2731789884
+ .long 1068398280
+ .long 3450718392
+ .long 3159216547
+ .long 1044477961
+ .long 1068463577
+ .long 2230553229
+ .long 1011424339
+ .long 1486930287
+ .long 1068530218
+ .long 2861547474
+ .long 1012041376
+ .long 2293016881
+ .long 1068595466
+ .long 136843272
+ .long 1012684797
+ .long 201518157
+ .long 1068660680
+ .long 63231984
+ .long 1012427198
+ .long 4054234584
+ .long 1068725856
+ .long 3927006960
+ .long 1011878955
+ .long 1246477213
+ .long 1068790995
+ .long 1494265652
+ .long 3155219350
+ .long 678186699
+ .long 1068856093
+ .long 1264361424
+ .long 3159256693
+ .long 2690594995
+ .long 1068921148
+ .long 3906996379
+ .long 1009288267
+ .long 3362611517
+ .long 1068986159
+ .long 1650970041
+ .long 3158331771
+ .long 3102162111
+ .long 1069051124
+ .long 365917035
+ .long 3160264153
+ .long 2352611067
+ .long 1069116041
+ .long 4008970190
+ .long 3159478182
+ .long 1594134794
+ .long 1069180908
+ .long 466690178
+ .long 1012526501
+ .long 1345079306
+ .long 1069245723
+ .long 2268273568
+ .long 3160164092
+ .long 2163300970
+ .long 1069310484
+ .long 2750834800
+ .long 3158113482
+ .long 352522716
+ .long 1069375190
+ .long 1750411372
+ .long 1011790845
+ .long 848541647
+ .long 1069439838
+ .long 2164207573
+ .long 1011698350
+ .long 40647312
+ .long 1069504427
+ .long 2949165434
+ .long 3159107267
+ .long 2216766270
+ .long 1069574357
+ .long 2197920765
+ .long 3161055954
+ .long 1090914384
+ .long 1069638757
+ .long 2330454674
+ .long 1013365998
+ .long 387601244
+ .long 1069703022
+ .long 3185681168
+ .long 1013434071
+ .long 3991640484
+ .long 1069767144
+ .long 1313211590
+ .long 3161087959
+ .long 3322489502
+ .long 1069831118
+ .long 3013977995
+ .long 1013053011
+ .long 3121698570
+ .long 1069894936
+ .long 4069015667
+ .long 1013023362
+ .long 4289964660
+ .long 1069958591
+ .long 1736191156
+ .long 3158266731
+ .long 3903312386
+ .long 1070022077
+ .long 1833592413
+ .long 3159731471
+ .long 3818449864
+ .long 1070085387
+ .long 851036429
+ .long 3159730451
+ .long 2097480306
+ .long 1070148515
+ .long 3506390884
+ .long 3160462302
+ .long 1611694502
+ .long 1070211454
+ .long 2785735540
+ .long 3160465144
+ .long 1464694796
+ .long 1070274198
+ .long 4229277299
+ .long 3159907000
+ .long 1299612775
+ .long 1070336741
+ .long 4116653788
+ .long 3160427739
+ .long 1310544789
+ .long 1070399077
+ .long 1064430331
+ .long 1013218202
+ .long 2253168030
+ .long 1070461200
+ .long 1405044609
+ .long 3157623179
+ .long 1159567373
+ .long 1070523105
+ .long 2353445521
+ .long 3159992176
+ .long 1359373750
+ .long 1070605818
+ .long 1748171336
+ .long 3161879263
+ .long 908341706
+ .long 1070667034
+ .long 3372710815
+ .long 3161775245
+ .long 1743027350
+ .long 1070727765
+ .long 687089934
+ .long 3160507171
+ .long 2055355646
+ .long 1070787992
+ .long 2392855242
+ .long 1013682469
+ .long 690426164
+ .long 1070847697
+ .long 1103926666
+ .long 1014052810
+ .long 1483247847
+ .long 1070906862
+ .long 2082645847
+ .long 3161345479
+ .long 392040270
+ .long 1070965472
+ .long 2407720023
+ .long 1014053754
+ .long 2673846014
+ .long 1071023511
+ .long 1293605532
+ .long 3158464385
+ .long 1384215810
+ .long 1071080967
+ .long 2446095872
+ .long 3159216407
+ .long 3101660631
+ .long 1071137826
+ .long 698040758
+ .long 1014855328
+ .long 2094057058
+ .long 1071194078
+ .long 2282048339
+ .long 1014040385
+ .long 1712750594
+ .long 1071249712
+ .long 1204372378
+ .long 3162276464
+ .long 1411515787
+ .long 1071304719
+ .long 949080808
+ .long 1015006403
+ .long 931538085
+ .long 1071359091
+ .long 3027127039
+ .long 1014307233
+ .long 179139065
+ .long 1071412821
+ .long 4285547492
+ .long 3161934731
+ .long 3387721259
+ .long 1071465902
+ .long 373225773
+ .long 1013486625
+ .long 2132236852
+ .long 1071544299
+ .long 3250533429
+ .long 1014031677
+ .long 1942070284
+ .long 1071645596
+ .long 1237964179
+ .long 3163239113
+ .long 1532707802
+ .long 1071695380
+ .long 330645583
+ .long 1012495610
+ .long 2294184979
+ .long 1071743834
+ .long 3959472897
+ .long 1015833116
+ .long 3805060714
+ .long 1071790961
+ .long 2671256142
+ .long 1013727772
+ .long 2215037898
+ .long 1071836770
+ .long 2683359117
+ .long 1015831902
+ .long 483661594
+ .long 1071881273
+ .long 836288326
+ .long 3162648643
+ .long 1534679894
+ .long 1071924486
+ .long 373258696
+ .long 3162470096
+ .long 1538714628
+ .long 1071966430
+ .long 3199433068
+ .long 1015325501
+ .long 527642555
+ .long 1072007128
+ .long 3636832592
+ .long 3161843145
+ .long 291339150
+ .long 1072046605
+ .long 890169537
+ .long 3160586117
+ .long 2450210201
+ .long 1072084888
+ .long 1636353294
+ .long 3163193400
+ .long 2411367951
+ .long 1072122007
+ .long 374899873
+ .long 1011331750
+ .long 681549971
+ .long 1072157992
+ .long 506411689
+ .long 1015373954
+ .long 1466745541
+ .long 1072192873
+ .long 2143860931
+ .long 1013364334
+ .long 2845622366
+ .long 1072226682
+ .long 2869178209
+ .long 3162423682
+ .long 2838871438
+ .long 1072275456
+ .long 3742223599
+ .long 1014338577
+ .long 4200275274
+ .long 1072337034
+ .long 1566539915
+ .long 3161839550
+ .long 3034733530
+ .long 1072394897
+ .long 652621408
+ .long 3162261964
+ .long 3207412993
+ .long 1072449290
+ .long 3206124665
+ .long 1014408733
+ .long 624461478
+ .long 1072500450
+ .long 932437485
+ .long 1015204343
+ .long 767665908
+ .long 1072548600
+ .long 1037911952
+ .long 3163527627
+ .long 1110773639
+ .long 1072593952
+ .long 2371517912
+ .long 3160465741
+ .long 1940828530
+ .long 1072636704
+ .long 2731408428
+ .long 3162895795
+ .long 1911329388
+ .long 1072677041
+ .long 1773089615
+ .long 3159569267
+ .long 1764715788
+ .long 1072704191
+ .long 691346949
+ .long 3164069946
+ .long 3332979233
+ .long 1072722195
+ .long 3550733983
+ .long 1014770628
+ .long 1321870254
+ .long 1072739231
+ .long 1415315820
+ .long 1016224052
+ .long 3657429030
+ .long 1072755365
+ .long 3910539033
+ .long 1015966402
+ .long 4197624557
+ .long 1072770661
+ .long 2333399254
+ .long 3164546480
+ .long 1512059493
+ .long 1072785177
+ .long 2701510318
+ .long 1016178092
+ .long 453379037
+ .long 1072798965
+ .long 4046344253
+ .long 3162814364
+ .long 1942345162
+ .long 1072818388
+ .long 621134147
+ .long 1016335195
+ .long 4210176273
+ .long 1072842164
+ .long 2701013387
+ .long 3164326619
+ .long 4185644010
+ .long 1072863795
+ .long 4163699341
+ .long 1016203112
+ .long 679688788
+ .long 1072883543
+ .long 4147276762
+ .long 1014066750
+ .long 29432865
+ .long 1072901630
+ .long 970415797
+ .long 1016902063
+ .long 4070721092
+ .long 1072918247
+ .long 2539004411
+ .long 3163736096
+ .long 2252468843
+ .long 1072933561
+ .long 3424082887
+ .long 3163407177
+ .long 2929724825
+ .long 1072947712
+ .long 3661482235
+ .long 3163846989
+ .long 1377513368
+ .long 1072960824
+ .long 3987926680
+ .long 1013647908
+ .long 1031632908
+ .long 1072973003
+ .long 3672217151
+ .long 1016614619
+ .long 2516508130
+ .long 1072984342
+ .long 545855020
+ .long 3162728930
+ .long 3792452178
+ .long 1072994923
+ .long 3420119467
+ .long 1016471430
+ .long 3147791459
+ .long 1073004818
+ .long 1342204979
+ .long 1013937254
+ .long 999189752
+ .long 1073014090
+ .long 1006335472
+ .long 3162850919
+ .long 711011011
+ .long 1073022794
+ .long 4633488
+ .long 3162966895
+ .long 15640363
+ .long 1073030980
+ .long 1686389560
+ .long 3164376226
+ .long 1218463589
+ .long 1073042382
+ .long 1526837110
+ .long 3163533985
+ .long 2538470555
+ .long 1073056144
+ .long 2273304406
+ .long 3163784996
+ .long 1229720947
+ .long 1073068489
+ .long 2971628206
+ .long 3162356540
+ .long 3115427016
+ .long 1073079621
+ .long 4215132957
+ .long 3164282762
+ .long 4030612557
+ .long 1073089709
+ .long 1913251691
+ .long 3163671292
+ .long 2728521257
+ .long 1073098892
+ .long 2861089500
+ .long 1015454459
+ .long 1118696283
+ .long 1073107285
+ .long 1628948053
+ .long 1016179658
+ .long 2682711255
+ .long 1073114984
+ .long 2906306266
+ .long 1014142643
+ .long 2073898081
+ .long 1073122072
+ .long 1322740454
+ .long 3164497217
+ .long 1403700297
+ .long 1073128618
+ .long 416137895
+ .long 3162781466
+ .long 2502685617
+ .long 1073134681
+ .long 3242008732
+ .long 1014593495
+ .long 1531926851
+ .long 1073140313
+ .long 1362708094
+ .long 1016517604
+ .long 3572814411
+ .long 1073145557
+ .long 3709790527
+ .long 1012646874
+ .long 1695536111
+ .long 1073150453
+ .long 3980346340
+ .long 1016705136
+ .long 2363057203
+ .long 1073155033
+ .long 2551194792
+ .long 1012569695
+ .long 2873365682
+ .long 1073159327
+ .long 3181154748
+ .long 1017041450
+ .long 1053384691
+ .long 1073165288
+ .long 3074536879
+ .long 1016965660
+ .long 3270542712
+ .long 1073172451
+ .long 2535319415
+ .long 3163051778
+ .long 1353631484
+ .long 1073178850
+ .long 1173833755
+ .long 1015534537
+ .long 3511218460
+ .long 1073184599
+ .long 1243608109
+ .long 3161592122
+ .long 4121259284
+ .long 1073189793
+ .long 398584912
+ .long 3163829923
+ .long 1193862106
+ .long 1073194509
+ .long 1873745539
+ .long 3163802819
+ .long 3861949790
+ .long 1073198808
+ .long 3841261147
+ .long 1015587248
+ .long 1486904578
+ .long 1073202745
+ .long 1634726776
+ .long 3163847886
+ .long 2879153715
+ .long 1073206362
+ .long 200456242
+ .long 3164138657
+ .long 385353253
+ .long 1073209698
+ .long 1186355517
+ .long 1014887155
+ .long 1125865839
+ .long 1073212783
+ .long 203561262
+ .long 3161244927
+ .long 1221361475
+ .long 1073215645
+ .long 3382476563
+ .long 1014936138
+ .long 2077323573
+ .long 1073218307
+ .long 1005121005
+ .long 3164430752
+ .long 215611373
+ .long 1073220790
+ .long 353198764
+ .long 3164485137
+ .long 2347419265
+ .long 1073223110
+ .long 1103143360
+ .long 1016542137
+ .long 1379112765
+ .long 1073225284
+ .long 381583533
+ .long 3162870833
+ .long 3891198463
+ .long 1073228298
+ .long 1771275754
+ .long 1014654681
+ .long 3395914051
+ .long 1073231917
+ .long 2350900914
+ .long 3164013978
+ .long 2799919478
+ .long 1073235146
+ .long 2893950164
+ .long 3163260901
+ .long 1138673476
+ .long 1073238045
+ .long 2622204785
+ .long 3164174388
+ .long 3408855940
+ .long 1073240661
+ .long 2800881650
+ .long 1016008624
+ .long 2044858738
+ .long 1073243035
+ .long 604544785
+ .long 1017022901
+ .long 2578795176
+ .long 1073245198
+ .long 2557332925
+ .long 1016135165
+ .long 4196285314
+ .long 1073247177
+ .long 2032365307
+ .long 1016194735
+ .long 224877747
+ .long 1073248996
+ .long 497926916
+ .long 1016947111
+ .long 3271386490
+ .long 1073250671
+ .long 2689994846
+ .long 1016631513
+ .long 813635989
+ .long 1073252221
+ .long 747035277
+ .long 3164530136
+ .long 369829519
+ .long 1073253658
+ .long 2182033858
+ .long 3163190340
+ .long 1187679052
+ .long 1073254994
+ .long 673954443
+ .long 1016149821
+ .long 4232586098
+ .long 1073256239
+ .long 497775200
+ .long 3162179015
+ .long 426690558
+ .long 1073257404
+ .long 3063343247
+ .long 1016865578
+ .long 1624065902
+ .long 1073258494
+ .long 1354224996
+ .long 3163503778
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .type atan_tbl,@object
+ .size atan_tbl,2592
+ .align 4
+pi_table:
+ .long 1413754136
+ .long 1073291771
+ .long 856972295
+ .long 1016178214
+ .type pi_table,@object
+ .size pi_table,16
+ .align 4
+SGNMASK:
+ .long 4294967295
+ .long 2147483647
+ .type SGNMASK,@object
+ .size SGNMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_atan.1-.
+ .4byte ..___tag_value_atan.5-..___tag_value_atan.1
+ .2byte 0x0400
+ .4byte ..___tag_value_atan.3-..___tag_value_atan.1
+ .2byte 0x100e
+ .byte 0x04
+ .4byte ..___tag_value_atan.4-..___tag_value_atan.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/s_cbrt.S b/libm/x86_64/s_cbrt.S
new file mode 100644
index 0000000..4aa4373
--- /dev/null
+++ b/libm/x86_64/s_cbrt.S
@@ -0,0 +1,754 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Assume x=2^{3*k+j} * 1.b1 b2 ... b5 b6 ... b52, where j = 0,1,2.
+// Let r=(x*2^{-3k-j} - 1.b1 b2 ... b5 1)* rcp[b1 b2 ..b5],
+// where rcp[b1 b2 .. b5]=1/(1.b1 b2 b3 b4 b5 1) in double precision
+// cbrt(2^j * 1. b1 b2 .. b5 1) is approximated as T[j][b1..b5]+D[j][b1..b5]
+// (T stores the high 53 bits, D stores the low order bits)
+// Result=2^k*T+(2^k*T*r)*P+2^k*D
+// where P=p1+p2*r+..+p8*r^7
+//
+// Special cases:
+// cbrt(NaN) = quiet NaN, and raise invalid exception
+// cbrt(INF) = that INF
+// cbrt(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin cbrt
+ENTRY(cbrt)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_cbrt.1:
+ subq $24, %rsp
+..___tag_value_cbrt.3:
+ movsd %xmm0, (%rsp)
+..B1.2:
+ movq %xmm0, %xmm7
+ movl $524032, %edx
+ movsd EXP_MSK3(%rip), %xmm5
+ movsd EXP_MSK2(%rip), %xmm3
+ psrlq $44, %xmm7
+ pextrw $0, %xmm7, %ecx
+ movd %xmm7, %eax
+ movsd EXP_MASK(%rip), %xmm1
+ movsd SIG_MASK(%rip), %xmm2
+ andl $248, %ecx
+ lea rcp_table(%rip), %r8
+ movsd (%rcx,%r8), %xmm4
+ movq %rax, %r9
+ andl %eax, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_0.0.1
+ cmpl $524032, %edx
+ je .L_2TAG_PACKET_1.0.1
+ shrl $8, %edx
+ shrq $8, %r9
+ andpd %xmm0, %xmm2
+ andpd %xmm5, %xmm0
+ orpd %xmm2, %xmm3
+ orpd %xmm0, %xmm1
+ movapd coeff_table(%rip), %xmm5
+ movl $5462, %eax
+ movapd 16+coeff_table(%rip), %xmm6
+ mull %edx
+ movq %r9, %rdx
+ andq $2047, %r9
+ shrl $14, %eax
+ andl $2048, %edx
+ subq %rax, %r9
+ subq %rax, %r9
+ subq %rax, %r9
+ shlq $8, %r9
+ addl $682, %eax
+ orl %edx, %eax
+ movd %eax, %xmm7
+ addq %r9, %rcx
+ psllq $52, %xmm7
+.L_2TAG_PACKET_2.0.1:
+ movapd 32+coeff_table(%rip), %xmm2
+ movapd 48+coeff_table(%rip), %xmm0
+ subsd %xmm3, %xmm1
+ movq %xmm7, %xmm3
+ lea cbrt_table(%rip), %r8
+ mulsd (%rcx,%r8), %xmm7
+ mulsd %xmm4, %xmm1
+ lea D_table(%rip), %r8
+ mulsd (%rcx,%r8), %xmm3
+ movapd %xmm1, %xmm4
+ unpcklpd %xmm1, %xmm1
+ mulpd %xmm1, %xmm5
+ mulpd %xmm1, %xmm6
+ mulpd %xmm1, %xmm1
+ addpd %xmm5, %xmm2
+ addpd %xmm6, %xmm0
+ mulpd %xmm1, %xmm2
+ mulpd %xmm1, %xmm1
+ mulsd %xmm7, %xmm4
+ addpd %xmm2, %xmm0
+ mulsd %xmm0, %xmm1
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ mulsd %xmm4, %xmm0
+ addsd %xmm3, %xmm0
+ addsd %xmm7, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_0.0.1:
+ mulsd SCALE63(%rip), %xmm0
+ movq %xmm0, %xmm7
+ movl $524032, %edx
+ psrlq $44, %xmm7
+ pextrw $0, %xmm7, %ecx
+ movd %xmm7, %eax
+ andl $248, %ecx
+ lea rcp_table(%rip), %r8
+ movsd (%rcx,%r8), %xmm4
+ movq %rax, %r9
+ andl %eax, %edx
+ shrl $8, %edx
+ shrq $8, %r9
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_3.0.1
+ andpd %xmm0, %xmm2
+ andpd %xmm5, %xmm0
+ orpd %xmm2, %xmm3
+ orpd %xmm0, %xmm1
+ movapd coeff_table(%rip), %xmm5
+ movl $5462, %eax
+ movapd 16+coeff_table(%rip), %xmm6
+ mull %edx
+ movq %r9, %rdx
+ andq $2047, %r9
+ shrl $14, %eax
+ andl $2048, %edx
+ subq %rax, %r9
+ subq %rax, %r9
+ subq %rax, %r9
+ shlq $8, %r9
+ addl $661, %eax
+ orl %edx, %eax
+ movd %eax, %xmm7
+ addq %r9, %rcx
+ psllq $52, %xmm7
+ jmp .L_2TAG_PACKET_2.0.1
+.L_2TAG_PACKET_3.0.1:
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_4.0.1
+ xorpd %xmm0, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_4.0.1:
+ movsd ZERON(%rip), %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_1.0.1:
+ movl 4(%rsp), %eax
+ movl (%rsp), %edx
+ movl %eax, %ecx
+ andl $2147483647, %ecx
+ cmpl $2146435072, %ecx
+ ja .L_2TAG_PACKET_5.0.1
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_5.0.1
+ cmpl $2146435072, %eax
+ jne .L_2TAG_PACKET_6.0.1
+ movsd INF(%rip), %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_6.0.1:
+ movsd NEG_INF(%rip), %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_5.0.1:
+ movsd (%rsp), %xmm0
+ addsd %xmm0, %xmm0
+ movq %xmm0, 8(%rsp)
+.L_2TAG_PACKET_7.0.1:
+..B1.4:
+ addq $24, %rsp
+..___tag_value_cbrt.4:
+ ret
+..___tag_value_cbrt.5:
+END(cbrt)
+# -- End cbrt
+ .section .rodata, "a"
+ .align 16
+ .align 16
+coeff_table:
+ .long 1553778919
+ .long 3213899486
+ .long 3534952507
+ .long 3215266280
+ .long 1646371399
+ .long 3214412045
+ .long 477218588
+ .long 3216798151
+ .long 3582521621
+ .long 1066628362
+ .long 1007461464
+ .long 1068473053
+ .long 889629714
+ .long 1067378449
+ .long 1431655765
+ .long 1070945621
+ .type coeff_table,@object
+ .size coeff_table,64
+ .align 4
+EXP_MSK3:
+ .long 4294967295
+ .long 1048575
+ .type EXP_MSK3,@object
+ .size EXP_MSK3,8
+ .align 4
+EXP_MSK2:
+ .long 0
+ .long 3220193280
+ .type EXP_MSK2,@object
+ .size EXP_MSK2,8
+ .align 4
+EXP_MASK:
+ .long 0
+ .long 3220176896
+ .type EXP_MASK,@object
+ .size EXP_MASK,8
+ .align 4
+SIG_MASK:
+ .long 0
+ .long 1032192
+ .type SIG_MASK,@object
+ .size SIG_MASK,8
+ .align 4
+rcp_table:
+ .long 528611360
+ .long 3220144632
+ .long 2884679527
+ .long 3220082993
+ .long 1991868891
+ .long 3220024928
+ .long 2298714891
+ .long 3219970134
+ .long 58835168
+ .long 3219918343
+ .long 3035110223
+ .long 3219869313
+ .long 1617585086
+ .long 3219822831
+ .long 2500867033
+ .long 3219778702
+ .long 4241943008
+ .long 3219736752
+ .long 258732970
+ .long 3219696825
+ .long 404232216
+ .long 3219658776
+ .long 2172167368
+ .long 3219622476
+ .long 1544257904
+ .long 3219587808
+ .long 377579543
+ .long 3219554664
+ .long 1616385542
+ .long 3219522945
+ .long 813783277
+ .long 3219492562
+ .long 3940743189
+ .long 3219463431
+ .long 2689777499
+ .long 3219435478
+ .long 1700977147
+ .long 3219408632
+ .long 3169102082
+ .long 3219382828
+ .long 327235604
+ .long 3219358008
+ .long 1244336319
+ .long 3219334115
+ .long 1300311200
+ .long 3219311099
+ .long 3095471925
+ .long 3219288912
+ .long 2166487928
+ .long 3219267511
+ .long 2913108253
+ .long 3219246854
+ .long 293672978
+ .long 3219226904
+ .long 288737297
+ .long 3219207624
+ .long 1810275472
+ .long 3219188981
+ .long 174592167
+ .long 3219170945
+ .long 3539053052
+ .long 3219153485
+ .long 2164392968
+ .long 3219136576
+ .type rcp_table,@object
+ .size rcp_table,256
+ .align 4
+cbrt_table:
+ .long 572345495
+ .long 1072698681
+ .long 1998204467
+ .long 1072709382
+ .long 3861501553
+ .long 1072719872
+ .long 2268192434
+ .long 1072730162
+ .long 2981979308
+ .long 1072740260
+ .long 270859143
+ .long 1072750176
+ .long 2958651392
+ .long 1072759916
+ .long 313113243
+ .long 1072769490
+ .long 919449400
+ .long 1072778903
+ .long 2809328903
+ .long 1072788162
+ .long 2222981587
+ .long 1072797274
+ .long 2352530781
+ .long 1072806244
+ .long 594152517
+ .long 1072815078
+ .long 1555767199
+ .long 1072823780
+ .long 4282421314
+ .long 1072832355
+ .long 2355578597
+ .long 1072840809
+ .long 1162590619
+ .long 1072849145
+ .long 797864051
+ .long 1072857367
+ .long 431273680
+ .long 1072865479
+ .long 2669831148
+ .long 1072873484
+ .long 733477752
+ .long 1072881387
+ .long 4280220604
+ .long 1072889189
+ .long 801961634
+ .long 1072896896
+ .long 2915370760
+ .long 1072904508
+ .long 1159613482
+ .long 1072912030
+ .long 2689944798
+ .long 1072919463
+ .long 1248687822
+ .long 1072926811
+ .long 2967951030
+ .long 1072934075
+ .long 630170432
+ .long 1072941259
+ .long 3760898254
+ .long 1072948363
+ .long 0
+ .long 1072955392
+ .long 2370273294
+ .long 1072962345
+ .long 1261754802
+ .long 1072972640
+ .long 546334065
+ .long 1072986123
+ .long 1054893830
+ .long 1072999340
+ .long 1571187597
+ .long 1073012304
+ .long 1107975175
+ .long 1073025027
+ .long 3606909377
+ .long 1073037519
+ .long 1113616747
+ .long 1073049792
+ .long 4154744632
+ .long 1073061853
+ .long 3358931423
+ .long 1073073713
+ .long 4060702372
+ .long 1073085379
+ .long 747576176
+ .long 1073096860
+ .long 3023138255
+ .long 1073108161
+ .long 1419988548
+ .long 1073119291
+ .long 1914185305
+ .long 1073130255
+ .long 294389948
+ .long 1073141060
+ .long 3761802570
+ .long 1073151710
+ .long 978281566
+ .long 1073162213
+ .long 823148820
+ .long 1073172572
+ .long 2420954441
+ .long 1073182792
+ .long 3815449908
+ .long 1073192878
+ .long 2046058587
+ .long 1073202835
+ .long 1807524753
+ .long 1073212666
+ .long 2628681401
+ .long 1073222375
+ .long 3225667357
+ .long 1073231966
+ .long 1555307421
+ .long 1073241443
+ .long 3454043099
+ .long 1073250808
+ .long 1208137896
+ .long 1073260066
+ .long 3659916772
+ .long 1073269218
+ .long 1886261264
+ .long 1073278269
+ .long 3593647839
+ .long 1073287220
+ .long 3086012205
+ .long 1073296075
+ .long 2769796922
+ .long 1073304836
+ .long 888716057
+ .long 1073317807
+ .long 2201465623
+ .long 1073334794
+ .long 164369365
+ .long 1073351447
+ .long 3462666733
+ .long 1073367780
+ .long 2773905457
+ .long 1073383810
+ .long 1342879088
+ .long 1073399550
+ .long 2543933975
+ .long 1073415012
+ .long 1684477781
+ .long 1073430209
+ .long 3532178543
+ .long 1073445151
+ .long 1147747300
+ .long 1073459850
+ .long 1928031793
+ .long 1073474314
+ .long 2079717015
+ .long 1073488553
+ .long 4016765315
+ .long 1073502575
+ .long 3670431139
+ .long 1073516389
+ .long 3549227225
+ .long 1073530002
+ .long 11637607
+ .long 1073543422
+ .long 588220169
+ .long 1073556654
+ .long 2635407503
+ .long 1073569705
+ .long 2042029317
+ .long 1073582582
+ .long 1925128962
+ .long 1073595290
+ .long 4136375664
+ .long 1073607834
+ .long 759964600
+ .long 1073620221
+ .long 4257606771
+ .long 1073632453
+ .long 297278907
+ .long 1073644538
+ .long 3655053093
+ .long 1073656477
+ .long 2442253172
+ .long 1073668277
+ .long 1111876799
+ .long 1073679941
+ .long 3330973139
+ .long 1073691472
+ .long 3438879452
+ .long 1073702875
+ .long 3671565478
+ .long 1073714153
+ .long 1317849547
+ .long 1073725310
+ .long 1642364115
+ .long 1073736348
+ .type cbrt_table,@object
+ .size cbrt_table,768
+ .align 4
+D_table:
+ .long 4050900474
+ .long 1014427190
+ .long 1157977860
+ .long 1016444461
+ .long 1374568199
+ .long 1017271387
+ .long 2809163288
+ .long 1016882676
+ .long 3742377377
+ .long 1013168191
+ .long 3101606597
+ .long 1017541672
+ .long 65224358
+ .long 1017217597
+ .long 2691591250
+ .long 1017266643
+ .long 4020758549
+ .long 1017689313
+ .long 1316310992
+ .long 1018030788
+ .long 1031537856
+ .long 1014090882
+ .long 3261395239
+ .long 1016413641
+ .long 886424999
+ .long 1016313335
+ .long 3114776834
+ .long 1014195875
+ .long 1681120620
+ .long 1017825416
+ .long 1329600273
+ .long 1016625740
+ .long 465474623
+ .long 1017097119
+ .long 4251633980
+ .long 1017169077
+ .long 1986990133
+ .long 1017710645
+ .long 752958613
+ .long 1017159641
+ .long 2216216792
+ .long 1018020163
+ .long 4282860129
+ .long 1015924861
+ .long 1557627859
+ .long 1016039538
+ .long 3889219754
+ .long 1018086237
+ .long 3684996408
+ .long 1017353275
+ .long 723532103
+ .long 1017717141
+ .long 2951149676
+ .long 1012528470
+ .long 831890937
+ .long 1017830553
+ .long 1031212645
+ .long 1017387331
+ .long 2741737450
+ .long 1017604974
+ .long 2863311531
+ .long 1003776682
+ .long 4276736099
+ .long 1013153088
+ .long 4111778382
+ .long 1015673686
+ .long 1728065769
+ .long 1016413986
+ .long 2708718031
+ .long 1018078833
+ .long 1069335005
+ .long 1015291224
+ .long 700037144
+ .long 1016482032
+ .long 2904566452
+ .long 1017226861
+ .long 4074156649
+ .long 1017622651
+ .long 25019565
+ .long 1015245366
+ .long 3601952608
+ .long 1015771755
+ .long 3267129373
+ .long 1017904664
+ .long 503203103
+ .long 1014921629
+ .long 2122011730
+ .long 1018027866
+ .long 3927295461
+ .long 1014189456
+ .long 2790625147
+ .long 1016024251
+ .long 1330460186
+ .long 1016940346
+ .long 4033568463
+ .long 1015538390
+ .long 3695818227
+ .long 1017509621
+ .long 257573361
+ .long 1017208868
+ .long 3227697852
+ .long 1017337964
+ .long 234118548
+ .long 1017169577
+ .long 4009025803
+ .long 1017278524
+ .long 1948343394
+ .long 1017749310
+ .long 678398162
+ .long 1018144239
+ .long 3083864863
+ .long 1016669086
+ .long 2415453452
+ .long 1017890370
+ .long 175467344
+ .long 1017330033
+ .long 3197359580
+ .long 1010339928
+ .long 2071276951
+ .long 1015941358
+ .long 268372543
+ .long 1016737773
+ .long 938132959
+ .long 1017389108
+ .long 1816750559
+ .long 1017337448
+ .long 4119203749
+ .long 1017152174
+ .long 2578653878
+ .long 1013108497
+ .long 2470331096
+ .long 1014678606
+ .long 123855735
+ .long 1016553320
+ .long 1265650889
+ .long 1014782687
+ .long 3414398172
+ .long 1017182638
+ .long 1040773369
+ .long 1016158401
+ .long 3483628886
+ .long 1016886550
+ .long 4140499405
+ .long 1016191425
+ .long 3893477850
+ .long 1016964495
+ .long 3935319771
+ .long 1009634717
+ .long 2978982660
+ .long 1015027112
+ .long 2452709923
+ .long 1017990229
+ .long 3190365712
+ .long 1015835149
+ .long 4237588139
+ .long 1015832925
+ .long 2610678389
+ .long 1017962711
+ .long 2127316774
+ .long 1017405770
+ .long 824267502
+ .long 1017959463
+ .long 2165924042
+ .long 1017912225
+ .long 2774007076
+ .long 1013257418
+ .long 4123916326
+ .long 1017582284
+ .long 1976417958
+ .long 1016959909
+ .long 4092806412
+ .long 1017711279
+ .long 119251817
+ .long 1015363631
+ .long 3475418768
+ .long 1017675415
+ .long 1972580503
+ .long 1015470684
+ .long 815541017
+ .long 1017517969
+ .long 2429917451
+ .long 1017397776
+ .long 4062888482
+ .long 1016749897
+ .long 68284153
+ .long 1017925678
+ .long 2207779246
+ .long 1016320298
+ .long 1183466520
+ .long 1017408657
+ .long 143326427
+ .long 1017060403
+ .type D_table,@object
+ .size D_table,768
+ .align 4
+SCALE63:
+ .long 0
+ .long 1138753536
+ .type SCALE63,@object
+ .size SCALE63,8
+ .align 4
+ZERON:
+ .long 0
+ .long 2147483648
+ .type ZERON,@object
+ .size ZERON,8
+ .align 4
+INF:
+ .long 0
+ .long 2146435072
+ .type INF,@object
+ .size INF,8
+ .align 4
+NEG_INF:
+ .long 0
+ .long 4293918720
+ .type NEG_INF,@object
+ .size NEG_INF,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_cbrt.1-.
+ .4byte ..___tag_value_cbrt.5-..___tag_value_cbrt.1
+ .2byte 0x0400
+ .4byte ..___tag_value_cbrt.3-..___tag_value_cbrt.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_cbrt.4-..___tag_value_cbrt.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/s_cos.S b/libm/x86_64/s_cos.S
new file mode 100644
index 0000000..ab5a0e1
--- /dev/null
+++ b/libm/x86_64/s_cos.S
@@ -0,0 +1,1275 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// 1. RANGE REDUCTION
+//
+// We perform an initial range reduction from X to r with
+//
+// X =~= N * pi/32 + r
+//
+// so that |r| <= pi/64 + epsilon. We restrict inputs to those
+// where |N| <= 932560. Beyond this, the range reduction is
+// insufficiently accurate. For extremely small inputs,
+// denormalization can occur internally, impacting performance.
+// This means that the main path is actually only taken for
+// 2^-252 <= |X| < 90112.
+//
+// To avoid branches, we perform the range reduction to full
+// accuracy each time.
+//
+// X - N * (P_1 + P_2 + P_3)
+//
+// where P_1 and P_2 are 32-bit numbers (so multiplication by N
+// is exact) and P_3 is a 53-bit number. Together, these
+// approximate pi well enough for all cases in the restricted
+// range.
+//
+// The main reduction sequence is:
+//
+// y = 32/pi * x
+// N = integer(y)
+// (computed by adding and subtracting off SHIFTER)
+//
+// m_1 = N * P_1
+// m_2 = N * P_2
+// r_1 = x - m_1
+// r = r_1 - m_2
+// (this r can be used for most of the calculation)
+//
+// c_1 = r_1 - r
+// m_3 = N * P_3
+// c_2 = c_1 - m_2
+// c = c_2 - m_3
+//
+// 2. MAIN ALGORITHM
+//
+// The algorithm uses a table lookup based on B = M * pi / 32
+// where M = N mod 64. The stored values are:
+// sigma closest power of 2 to cos(B)
+// C_hl 53-bit cos(B) - sigma
+// S_hi + S_lo 2 * 53-bit sin(B)
+//
+// The computation is organized as follows:
+//
+// sin(B + r + c) = [sin(B) + sigma * r] +
+// r * (cos(B) - sigma) +
+// sin(B) * [cos(r + c) - 1] +
+// cos(B) * [sin(r + c) - r]
+//
+// which is approximately:
+//
+// [S_hi + sigma * r] +
+// C_hl * r +
+// S_lo + S_hi * [(cos(r) - 1) - r * c] +
+// (C_hl + sigma) * [(sin(r) - r) + c]
+//
+// and this is what is actually computed. We separate this sum
+// into four parts:
+//
+// hi + med + pols + corr
+//
+// where
+//
+// hi = S_hi + sigma r
+// med = C_hl * r
+// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+// corr = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+// 3. POLYNOMIAL
+//
+// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+// (sin(r) - r) can be rearranged freely, since it is quite
+// small, so we exploit parallelism to the fullest.
+//
+// psc4 = SC_4 * r_1
+// msc4 = psc4 * r
+// r2 = r * r
+// msc2 = SC_2 * r2
+// r4 = r2 * r2
+// psc3 = SC_3 + msc4
+// psc1 = SC_1 + msc2
+// msc3 = r4 * psc3
+// sincospols = psc1 + msc3
+// pols = sincospols *
+// <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+// 4. CORRECTION TERM
+//
+// This is where the "c" component of the range reduction is
+// taken into account; recall that just "r" is used for most of
+// the calculation.
+//
+// -c = m_3 - c_2
+// -d = S_hi * r - (C_hl + sigma)
+// corr = -c * -d + S_lo
+//
+// 5. COMPENSATED SUMMATIONS
+//
+// The two successive compensated summations add up the high
+// and medium parts, leaving just the low parts to add up at
+// the end.
+//
+// rs = sigma * r
+// res_int = S_hi + rs
+// k_0 = S_hi - res_int
+// k_2 = k_0 + rs
+// med = C_hl * r
+// res_hi = res_int + med
+// k_1 = res_int - res_hi
+// k_3 = k_1 + med
+//
+// 6. FINAL SUMMATION
+//
+// We now add up all the small parts:
+//
+// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+// Now the overall result is just:
+//
+// res_hi + res_lo
+//
+// 7. SMALL ARGUMENTS
+//
+// Inputs with |X| < 2^-252 are treated specially as
+// 1 - |x|.
+//
+// Special cases:
+// cos(NaN) = quiet NaN, and raise invalid exception
+// cos(INF) = NaN and raise invalid exception
+// cos(0) = 1
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin cos
+ENTRY(cos)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_cos.1:
+ pushq %rbx
+..___tag_value_cos.3:
+ subq $16, %rsp
+..___tag_value_cos.5:
+ movsd %xmm0, 8(%rsp)
+..B1.2:
+ movl 12(%rsp), %eax
+ movq PI32INV(%rip), %xmm1
+ andl $2147418112, %eax
+ subl $808452096, %eax
+ cmpl $281346048, %eax
+ ja .L_2TAG_PACKET_0.0.1
+ mulsd %xmm0, %xmm1
+ movapd ONEHALF(%rip), %xmm5
+ movq SIGN_MASK(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %edx
+ cvtsi2sd %edx, %xmm1
+ movapd P_2(%rip), %xmm2
+ movq P_1(%rip), %xmm3
+ mulsd %xmm1, %xmm3
+ unpcklpd %xmm1, %xmm1
+ addq $1865232, %rdx
+ movq %xmm0, %xmm4
+ andq $63, %rdx
+ movapd SC_4(%rip), %xmm5
+ lea Ctable(%rip), %rax
+ shlq $5, %rdx
+ addq %rdx, %rax
+ mulpd %xmm1, %xmm2
+ subsd %xmm3, %xmm0
+ mulsd P_3(%rip), %xmm1
+ subsd %xmm3, %xmm4
+ movq 8(%rax), %xmm7
+ unpcklpd %xmm0, %xmm0
+ movq %xmm4, %xmm3
+ subsd %xmm2, %xmm4
+ mulpd %xmm0, %xmm5
+ subpd %xmm2, %xmm0
+ movapd SC_2(%rip), %xmm6
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm2, %xmm3
+ movapd (%rax), %xmm2
+ subsd %xmm3, %xmm1
+ movq 24(%rax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd SC_3(%rip), %xmm5
+ mulsd (%rax), %xmm4
+ addpd SC_1(%rip), %xmm6
+ mulpd %xmm0, %xmm5
+ movq %xmm3, %xmm0
+ addsd 8(%rax), %xmm3
+ mulpd %xmm7, %xmm1
+ movq %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movq 8(%rax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%rax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm5, %xmm0
+ addsd %xmm7, %xmm3
+ addsd %xmm1, %xmm0
+ addsd %xmm3, %xmm0
+ addsd %xmm6, %xmm0
+ unpckhpd %xmm6, %xmm6
+ addsd %xmm6, %xmm0
+ addsd %xmm4, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_0.0.1:
+ jg .L_2TAG_PACKET_1.0.1
+ pextrw $3, %xmm0, %eax
+ andw $32767, %ax
+ pinsrw $3, %eax, %xmm0
+ movq ONE(%rip), %xmm1
+ subsd %xmm0, %xmm1
+ movq %xmm1, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_1.0.1:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_2.0.1
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ subl $16224, %ecx
+ shrl $7, %ecx
+ andl $65532, %ecx
+ lea PI_INV_TABLE(%rip), %r11
+ addq %r11, %rcx
+ movd %xmm0, %rax
+ movl 20(%rcx), %r10d
+ movl 24(%rcx), %r8d
+ movl %eax, %edx
+ shrq $21, %rax
+ orl $-2147483648, %eax
+ shrl $11, %eax
+ movl %r10d, %r9d
+ imulq %rdx, %r10
+ imulq %rax, %r9
+ imulq %rax, %r8
+ movl 16(%rcx), %esi
+ movl 12(%rcx), %edi
+ movl %r10d, %r11d
+ shrq $32, %r10
+ addq %r10, %r9
+ addq %r8, %r11
+ movl %r11d, %r8d
+ shrq $32, %r11
+ addq %r11, %r9
+ movl %esi, %r10d
+ imulq %rdx, %rsi
+ imulq %rax, %r10
+ movl %edi, %r11d
+ imulq %rdx, %rdi
+ movl %esi, %ebx
+ shrq $32, %rsi
+ addq %rbx, %r9
+ movl %r9d, %ebx
+ shrq $32, %r9
+ addq %rsi, %r10
+ addq %r9, %r10
+ shlq $32, %rbx
+ orq %rbx, %r8
+ imulq %rax, %r11
+ movl 8(%rcx), %r9d
+ movl 4(%rcx), %esi
+ movl %edi, %ebx
+ shrq $32, %rdi
+ addq %rbx, %r10
+ movl %r10d, %ebx
+ shrq $32, %r10
+ addq %rdi, %r11
+ addq %r10, %r11
+ movq %r9, %rdi
+ imulq %rdx, %r9
+ imulq %rax, %rdi
+ movl %r9d, %r10d
+ shrq $32, %r9
+ addq %r10, %r11
+ movl %r11d, %r10d
+ shrq $32, %r11
+ addq %r9, %rdi
+ addq %r11, %rdi
+ movq %rsi, %r9
+ imulq %rdx, %rsi
+ imulq %rax, %r9
+ shlq $32, %r10
+ orq %rbx, %r10
+ movl (%rcx), %eax
+ movl %esi, %r11d
+ shrq $32, %rsi
+ addq %r11, %rdi
+ movl %edi, %r11d
+ shrq $32, %rdi
+ addq %rsi, %r9
+ addq %rdi, %r9
+ imulq %rax, %rdx
+ pextrw $3, %xmm0, %ebx
+ lea PI_INV_TABLE(%rip), %rdi
+ subq %rdi, %rcx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl $19, %ecx
+ movl $32768, %esi
+ andl %ebx, %esi
+ shrl $4, %ebx
+ andl $2047, %ebx
+ subl $1023, %ebx
+ subl %ebx, %ecx
+ addq %rdx, %r9
+ movl %ecx, %edx
+ addl $32, %edx
+ cmpl $1, %ecx
+ jl .L_2TAG_PACKET_3.0.1
+ negl %ecx
+ addl $29, %ecx
+ shll %cl, %r9d
+ movl %r9d, %edi
+ andl $536870911, %r9d
+ testl $268435456, %r9d
+ jne .L_2TAG_PACKET_4.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+.L_2TAG_PACKET_5.0.1:
+.L_2TAG_PACKET_6.0.1:
+ cmpq $0, %r9
+ je .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_8.0.1:
+ bsr %r9, %r11
+ movl $29, %ecx
+ subl %r11d, %ecx
+ jle .L_2TAG_PACKET_9.0.1
+ shlq %cl, %r9
+ movq %r10, %rax
+ shlq %cl, %r10
+ addl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shrq %cl, %rax
+ shrq %cl, %r8
+ orq %rax, %r9
+ orq %r8, %r10
+.L_2TAG_PACKET_10.0.1:
+ cvtsi2sdq %r9, %xmm0
+ shrq $1, %r10
+ cvtsi2sdq %r10, %xmm3
+ xorpd %xmm4, %xmm4
+ shll $4, %edx
+ negl %edx
+ addl $16368, %edx
+ orl %esi, %edx
+ xorl %ebx, %edx
+ pinsrw $3, %edx, %xmm4
+ movq PI_4(%rip), %xmm2
+ movq 8+PI_4(%rip), %xmm6
+ xorpd %xmm5, %xmm5
+ subl $1008, %edx
+ pinsrw $3, %edx, %xmm5
+ mulsd %xmm4, %xmm0
+ shll $16, %esi
+ sarl $31, %esi
+ mulsd %xmm5, %xmm3
+ movq %xmm0, %xmm1
+ mulsd %xmm2, %xmm0
+ shrl $29, %edi
+ addsd %xmm3, %xmm1
+ mulsd %xmm2, %xmm3
+ addl %esi, %edi
+ xorl %esi, %edi
+ mulsd %xmm1, %xmm6
+ movl %edi, %eax
+ addsd %xmm3, %xmm6
+ movq %xmm0, %xmm2
+ addsd %xmm6, %xmm0
+ subsd %xmm0, %xmm2
+ addsd %xmm2, %xmm6
+.L_2TAG_PACKET_11.0.1:
+ movq PI32INV(%rip), %xmm1
+ mulsd %xmm0, %xmm1
+ movq ONEHALF(%rip), %xmm5
+ movq SIGN_MASK(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %rdx
+ cvtsi2sdq %rdx, %xmm1
+ movq P_1(%rip), %xmm3
+ movapd P_2(%rip), %xmm2
+ mulsd %xmm1, %xmm3
+ unpcklpd %xmm1, %xmm1
+ shll $3, %eax
+ addl $1865232, %edx
+ movq %xmm0, %xmm4
+ addl %eax, %edx
+ andl $63, %edx
+ movapd SC_4(%rip), %xmm5
+ lea Ctable(%rip), %rax
+ shll $5, %edx
+ addq %rdx, %rax
+ mulpd %xmm1, %xmm2
+ subsd %xmm3, %xmm0
+ mulsd P_3(%rip), %xmm1
+ subsd %xmm3, %xmm4
+ movq 8(%rax), %xmm7
+ unpcklpd %xmm0, %xmm0
+ movq %xmm4, %xmm3
+ subsd %xmm2, %xmm4
+ mulpd %xmm0, %xmm5
+ subpd %xmm2, %xmm0
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm2, %xmm3
+ movapd (%rax), %xmm2
+ subsd %xmm3, %xmm1
+ movq 24(%rax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ subsd %xmm6, %xmm1
+ movapd SC_2(%rip), %xmm6
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd SC_3(%rip), %xmm5
+ mulsd (%rax), %xmm4
+ addpd SC_1(%rip), %xmm6
+ mulpd %xmm0, %xmm5
+ movq %xmm3, %xmm0
+ addsd 8(%rax), %xmm3
+ mulpd %xmm7, %xmm1
+ movq %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movq 8(%rax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%rax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm0, %xmm5
+ addsd %xmm7, %xmm3
+ addsd %xmm5, %xmm1
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ unpckhpd %xmm6, %xmm6
+ movq %xmm4, %xmm0
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_7.0.1:
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ movq $0, %r8
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_8.0.1
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_8.0.1
+ xorpd %xmm0, %xmm0
+ xorpd %xmm6, %xmm6
+ jmp .L_2TAG_PACKET_11.0.1
+.L_2TAG_PACKET_9.0.1:
+ je .L_2TAG_PACKET_10.0.1
+ negl %ecx
+ shrq %cl, %r10
+ movq %r9, %rax
+ shrq %cl, %r9
+ subl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shlq %cl, %rax
+ orq %rax, %r10
+ jmp .L_2TAG_PACKET_10.0.1
+.L_2TAG_PACKET_3.0.1:
+ negl %ecx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq %cl, %r9
+ movq %r9, %rdi
+ testl $-2147483648, %r9d
+ jne .L_2TAG_PACKET_12.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shrq $3, %rdi
+ jmp .L_2TAG_PACKET_6.0.1
+.L_2TAG_PACKET_4.0.1:
+ shrl %cl, %r9d
+ movl $536870912, %ebx
+ shrl %cl, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq $32, %rbx
+ addl $536870912, %edi
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ jmp .L_2TAG_PACKET_5.0.1
+.L_2TAG_PACKET_12.0.1:
+ shrl %cl, %r9d
+ movq $0x100000000, %rbx
+ shrq %cl, %rbx
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ shrq $3, %rdi
+ addl $536870912, %edi
+ jmp .L_2TAG_PACKET_6.0.1
+.L_2TAG_PACKET_2.0.1:
+ movsd 8(%rsp), %xmm0
+ mulsd NEG_ZERO(%rip), %xmm0
+ movq %xmm0, (%rsp)
+.L_2TAG_PACKET_13.0.1:
+..B1.4:
+ addq $16, %rsp
+..___tag_value_cos.6:
+ popq %rbx
+..___tag_value_cos.8:
+ ret
+..___tag_value_cos.9:
+END(cos)
+# -- End cos
+ .section .rodata, "a"
+ .align 16
+ .align 16
+ONEHALF:
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .type ONEHALF,@object
+ .size ONEHALF,16
+ .align 16
+P_2:
+ .long 442499072
+ .long 1032893537
+ .long 442499072
+ .long 1032893537
+ .type P_2,@object
+ .size P_2,16
+ .align 16
+SC_4:
+ .long 2773927732
+ .long 1053236707
+ .long 436314138
+ .long 1056571808
+ .type SC_4,@object
+ .size SC_4,16
+ .align 16
+Ctable:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 1072693248
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 1072693248
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 1071644672
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 1071644672
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 1070596096
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 1070596096
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 1069547520
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 3217031168
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 3218079744
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 3218079744
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 3219128320
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 3219128320
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 3220176896
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 3220176896
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 3219128320
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 3219128320
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 3218079744
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 3218079744
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 3217031168
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 1069547520
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 1070596096
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 1070596096
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 1071644672
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 1071644672
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 1072693248
+ .type Ctable,@object
+ .size Ctable,2048
+ .align 16
+SC_2:
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1067799893
+ .type SC_2,@object
+ .size SC_2,16
+ .align 16
+SC_3:
+ .long 436314138
+ .long 3207201184
+ .long 381774871
+ .long 3210133868
+ .type SC_3,@object
+ .size SC_3,16
+ .align 16
+SC_1:
+ .long 1431655765
+ .long 3217380693
+ .long 0
+ .long 3219128320
+ .type SC_1,@object
+ .size SC_1,16
+ .align 16
+PI_INV_TABLE:
+ .long 0
+ .long 0
+ .long 2734261102
+ .long 1313084713
+ .long 4230436817
+ .long 4113882560
+ .long 3680671129
+ .long 1011060801
+ .long 4266746795
+ .long 3736847713
+ .long 3072618042
+ .long 1112396512
+ .long 105459434
+ .long 164729372
+ .long 4263373596
+ .long 2972297022
+ .long 3900847605
+ .long 784024708
+ .long 3919343654
+ .long 3026157121
+ .long 965858873
+ .long 2203269620
+ .long 2625920907
+ .long 3187222587
+ .long 536385535
+ .long 3724908559
+ .long 4012839307
+ .long 1510632735
+ .long 1832287951
+ .long 667617719
+ .long 1330003814
+ .long 2657085997
+ .long 1965537991
+ .long 3957715323
+ .long 1023883767
+ .long 2320667370
+ .long 1811636145
+ .long 529358088
+ .long 1443049542
+ .long 4235946923
+ .long 4040145953
+ .type PI_INV_TABLE,@object
+ .size PI_INV_TABLE,164
+ .space 12, 0x00 # pad
+ .align 16
+PI_4:
+ .long 1073741824
+ .long 1072243195
+ .long 407279769
+ .long 1046758445
+ .type PI_4,@object
+ .size PI_4,16
+ .align 8
+PI32INV:
+ .long 1841940611
+ .long 1076125488
+ .type PI32INV,@object
+ .size PI32INV,8
+ .align 8
+SIGN_MASK:
+ .long 0
+ .long 2147483648
+ .type SIGN_MASK,@object
+ .size SIGN_MASK,8
+ .align 8
+P_1:
+ .long 1413480448
+ .long 1069097467
+ .type P_1,@object
+ .size P_1,8
+ .align 8
+P_3:
+ .long 771977331
+ .long 996350346
+ .type P_3,@object
+ .size P_3,8
+ .align 8
+ONE:
+ .long 0
+ .long 1072693248
+ .type ONE,@object
+ .size ONE,8
+ .align 8
+NEG_ZERO:
+ .long 0
+ .long 2147483648
+ .type NEG_ZERO,@object
+ .size NEG_ZERO,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000002c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_cos.1-.
+ .4byte ..___tag_value_cos.9-..___tag_value_cos.1
+ .2byte 0x0400
+ .4byte ..___tag_value_cos.3-..___tag_value_cos.1
+ .4byte 0x0283100e
+ .byte 0x04
+ .4byte ..___tag_value_cos.5-..___tag_value_cos.3
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_cos.6-..___tag_value_cos.5
+ .4byte 0x04c3100e
+ .4byte ..___tag_value_cos.8-..___tag_value_cos.6
+ .2byte 0x080e
+# End
diff --git a/libm/x86_64/s_expm1.S b/libm/x86_64/s_expm1.S
new file mode 100644
index 0000000..9da1d9d
--- /dev/null
+++ b/libm/x86_64/s_expm1.S
@@ -0,0 +1,727 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Description:
+// Let K = 64 (table size).
+//
+// Four sub-domains:
+// 1. |x| < 1/(2*K)
+// expm1(x) ~ P(x)
+// 2. 1/(2*K) <= |x| <= 56*log(2)
+// x x/log(2) n
+// e - 1 = 2 = 2 * T[j] * (1 + P(y)) - 1
+// 3. 56*log(2) < x < MAX_LOG
+// x x x/log(2) n
+// e - 1 ~ e = 2 = 2 * T[j] * (1 + P(y))
+// 4. x < -56*log(2)
+// x x
+// e - 1 = -1 + e ~ -1
+// where
+// x = m*log(2)/K + y, y in [-log(2)/K..log(2)/K]
+// m = n*K + j, m,n,j - signed integer, j in [-K/2..K/2]
+// j/K
+// values of 2 are tabulated as T[j] = T_hi[j] ( 1 + T_lo[j]).
+//
+// P(y) is a minimax polynomial approximation of exp(x)-1
+// on small interval [-log(2)/K..log(2)/K] (were calculated by Maple V).
+//
+// In case 3, to avoid problems with arithmetic overflow and underflow,
+// n n1 n2
+// value of 2 is safely computed as 2 * 2 where n1 in [-BIAS/2..BIAS/2]
+// and BIAS is a value of exponent bias.
+//
+// Special cases:
+// expm1(NaN) is NaN
+// expm1(+INF) is +INF
+// expm1(-INF) is -1
+// expm1(x) is x for subnormals
+// for finite argument, only expm1(0)=0 is exact.
+// For IEEE double
+// if x > 709.782712893383973096 then expm1(x) overflow
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin expm1
+ENTRY(expm1)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_expm1.1:
+ subq $56, %rsp
+..___tag_value_expm1.3:
+ movsd %xmm0, 32(%rsp)
+..B1.2:
+ unpcklpd %xmm0, %xmm0
+ movapd cv(%rip), %xmm1
+ movapd Shifter(%rip), %xmm6
+ movapd 16+cv(%rip), %xmm2
+ movapd 32+cv(%rip), %xmm3
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ movl $16527, %edx
+ subl %eax, %edx
+ subl $16304, %eax
+ orl %eax, %edx
+ cmpl $-2147483648, %edx
+ jae .L_2TAG_PACKET_0.0.2
+ mulpd %xmm0, %xmm1
+ addpd %xmm6, %xmm1
+ movapd %xmm1, %xmm7
+ subpd %xmm6, %xmm1
+ mulpd %xmm1, %xmm2
+ movapd 48+cv(%rip), %xmm4
+ mulpd %xmm1, %xmm3
+ movapd 64+cv(%rip), %xmm5
+ subpd %xmm2, %xmm0
+ movd %xmm7, %eax
+ movl %eax, %ecx
+ andl $63, %ecx
+ shll $4, %ecx
+ sarl $6, %eax
+ movl %eax, %edx
+ subpd %xmm3, %xmm0
+ lea Tbl_addr(%rip), %r11
+ movapd (%rcx,%r11), %xmm2
+ movq 80+cv(%rip), %xmm3
+ mulpd %xmm0, %xmm4
+ movapd %xmm0, %xmm1
+ mulpd %xmm0, %xmm0
+ mulsd %xmm0, %xmm3
+ addpd %xmm4, %xmm5
+ mulsd %xmm0, %xmm0
+ movq %xmm2, %xmm4
+ unpckhpd %xmm2, %xmm2
+ movdqa mmask(%rip), %xmm6
+ pand %xmm6, %xmm7
+ movdqa bias(%rip), %xmm6
+ paddq %xmm6, %xmm7
+ psllq $46, %xmm7
+ mulsd %xmm0, %xmm3
+ mulpd %xmm5, %xmm0
+ addl $894, %edx
+ cmpl $1916, %edx
+ ja .L_2TAG_PACKET_1.0.2
+ addsd %xmm3, %xmm0
+ xorpd %xmm3, %xmm3
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm3
+ orpd %xmm7, %xmm2
+ mulsd %xmm4, %xmm7
+ movq %xmm3, %xmm6
+ addsd %xmm1, %xmm3
+ pextrw $3, %xmm2, %edx
+ pshufd $238, %xmm0, %xmm5
+ psrlq $38, %xmm3
+ psllq $38, %xmm3
+ movq %xmm2, %xmm4
+ subsd %xmm3, %xmm6
+ addsd %xmm5, %xmm0
+ addsd %xmm6, %xmm1
+ addsd %xmm7, %xmm4
+ mulsd %xmm3, %xmm7
+ mulsd %xmm2, %xmm3
+ xorpd %xmm5, %xmm5
+ movl $16368, %eax
+ pinsrw $3, %eax, %xmm5
+ addsd %xmm1, %xmm0
+ movl $17184, %ecx
+ subl %edx, %ecx
+ subl $16256, %edx
+ orl %edx, %ecx
+ jl .L_2TAG_PACKET_2.0.2
+ mulsd %xmm4, %xmm0
+ subsd %xmm5, %xmm3
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+.L_2TAG_PACKET_3.0.2:
+ jmp ..B1.5
+.L_2TAG_PACKET_2.0.2:
+ cmpl $0, %edx
+ jl .L_2TAG_PACKET_4.0.2
+ mulsd %xmm4, %xmm0
+ subsd %xmm5, %xmm7
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_4.0.2:
+ mulsd %xmm4, %xmm0
+ addsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ subsd %xmm5, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_1.0.2:
+ movl 36(%rsp), %ecx
+ addsd %xmm0, %xmm1
+ unpckhpd %xmm0, %xmm0
+ addsd %xmm1, %xmm0
+ cmpl $0, %ecx
+ jl .L_2TAG_PACKET_5.0.2
+ fstcw (%rsp)
+ movw (%rsp), %dx
+ orw $768, %dx
+ movw %dx, 4(%rsp)
+ fldcw 4(%rsp)
+ movl %eax, %edx
+ sarl $1, %eax
+ subl %eax, %edx
+ movdqa emask(%rip), %xmm6
+ pandn %xmm2, %xmm6
+ addl $1023, %eax
+ movd %eax, %xmm3
+ psllq $52, %xmm3
+ orpd %xmm3, %xmm6
+ mulsd %xmm3, %xmm4
+ movsd %xmm0, 16(%rsp)
+ fldl 16(%rsp)
+ movsd %xmm6, 24(%rsp)
+ fldl 24(%rsp)
+ movsd %xmm4, 16(%rsp)
+ fldl 16(%rsp)
+ addl $1023, %edx
+ movd %edx, %xmm4
+ psllq $52, %xmm4
+ faddp %st, %st(1)
+ fmul %st, %st(1)
+ faddp %st, %st(1)
+ movsd %xmm4, 24(%rsp)
+ fldl 24(%rsp)
+ fmulp %st, %st(1)
+ fstpl 16(%rsp)
+ movsd 16(%rsp), %xmm0
+ fldcw (%rsp)
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ jmp ..B1.5
+ cmpl $-2147483648, %ecx
+ jb .L_2TAG_PACKET_6.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ movl $41, 8(%rsp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_8.0.2:
+ cmpl $2146435072, %eax
+ jae .L_2TAG_PACKET_9.0.2
+ movsd XMAX(%rip), %xmm0
+ mulsd %xmm0, %xmm0
+ movl $41, 8(%rsp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_9.0.2:
+ movl 36(%rsp), %eax
+ movl 32(%rsp), %edx
+ movl %eax, %ecx
+ andl $2147483647, %eax
+ cmpl $2146435072, %eax
+ ja .L_2TAG_PACKET_10.0.2
+ cmpl $0, %edx
+ jne .L_2TAG_PACKET_10.0.2
+ cmpl $0, %ecx
+ jl .L_2TAG_PACKET_11.0.2
+ movq INF(%rip), %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_11.0.2:
+ jmp .L_2TAG_PACKET_5.0.2
+.L_2TAG_PACKET_10.0.2:
+ movsd 32(%rsp), %xmm0
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_12.0.2:
+ addl $16304, %eax
+ cmpl $15504, %eax
+ jb .L_2TAG_PACKET_13.0.2
+ movapd cvl(%rip), %xmm2
+ pshufd $68, %xmm0, %xmm1
+ movapd 16+cvl(%rip), %xmm3
+ movapd 32+cvl(%rip), %xmm4
+ movq 48+cvl(%rip), %xmm5
+ mulsd %xmm1, %xmm1
+ xorpd %xmm6, %xmm6
+ movl $16352, %eax
+ pinsrw $3, %eax, %xmm6
+ mulpd %xmm0, %xmm2
+ xorpd %xmm7, %xmm7
+ movl $16368, %edx
+ pinsrw $3, %edx, %xmm7
+ addpd %xmm3, %xmm2
+ mulsd %xmm1, %xmm5
+ pshufd $228, %xmm1, %xmm3
+ mulpd %xmm1, %xmm1
+ mulsd %xmm0, %xmm6
+ mulpd %xmm0, %xmm2
+ addpd %xmm4, %xmm2
+ movq %xmm7, %xmm4
+ addsd %xmm6, %xmm7
+ mulpd %xmm3, %xmm1
+ psrlq $27, %xmm7
+ psllq $27, %xmm7
+ movq HIGHMASK(%rip), %xmm3
+ subsd %xmm7, %xmm4
+ mulpd %xmm1, %xmm2
+ addsd %xmm4, %xmm6
+ pshufd $238, %xmm2, %xmm1
+ addsd %xmm2, %xmm6
+ andpd %xmm0, %xmm3
+ movq %xmm0, %xmm4
+ addsd %xmm6, %xmm1
+ subsd %xmm3, %xmm0
+ addsd %xmm5, %xmm1
+ mulsd %xmm7, %xmm3
+ mulsd %xmm7, %xmm0
+ mulsd %xmm1, %xmm4
+ addsd %xmm4, %xmm0
+ addsd %xmm3, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_13.0.2:
+ cmpl $16, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ movq %xmm0, %xmm2
+ movd %xmm0, %eax
+ psrlq $31, %xmm2
+ movd %xmm2, %ecx
+ orl %ecx, %eax
+ je .L_2TAG_PACKET_3.0.2
+ movl $16, %edx
+ xorpd %xmm1, %xmm1
+ pinsrw $3, %edx, %xmm1
+ mulsd %xmm1, %xmm1
+ movl $42, 8(%rsp)
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_0.0.2:
+ cmpl $0, %eax
+ jl .L_2TAG_PACKET_12.0.2
+ movl 36(%rsp), %eax
+ cmpl $1083179008, %eax
+ jge .L_2TAG_PACKET_8.0.2
+ cmpl $-1048576, %eax
+ jae .L_2TAG_PACKET_9.0.2
+.L_2TAG_PACKET_5.0.2:
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_7.0.2:
+ movq %xmm0, 40(%rsp)
+..B1.3:
+ movq 40(%rsp), %xmm0
+.L_2TAG_PACKET_14.0.2:
+..B1.5:
+ addq $56, %rsp
+..___tag_value_expm1.4:
+ ret
+..___tag_value_expm1.5:
+END(expm1)
+# -- End expm1
+ .section .rodata, "a"
+ .align 16
+ .align 16
+cv:
+ .long 1697350398
+ .long 1079448903
+ .long 1697350398
+ .long 1079448903
+ .long 4277796864
+ .long 1065758274
+ .long 4277796864
+ .long 1065758274
+ .long 3164486458
+ .long 1025308570
+ .long 3164486458
+ .long 1025308570
+ .long 1963358694
+ .long 1065423121
+ .long 1431655765
+ .long 1069897045
+ .long 1431655765
+ .long 1067799893
+ .long 0
+ .long 1071644672
+ .long 381774871
+ .long 1062650220
+ .long 381774871
+ .long 1062650220
+ .type cv,@object
+ .size cv,96
+ .align 16
+Shifter:
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 1127743488
+ .type Shifter,@object
+ .size Shifter,16
+ .align 16
+Tbl_addr:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1000070955
+ .long 1042145304
+ .long 1040187392
+ .long 11418
+ .long 988267849
+ .long 1039500660
+ .long 3539992576
+ .long 22960
+ .long 36755401
+ .long 1042114290
+ .long 402653184
+ .long 34629
+ .long 3634769483
+ .long 1042178627
+ .long 1820327936
+ .long 46424
+ .long 2155991225
+ .long 1041560680
+ .long 847249408
+ .long 58348
+ .long 2766913307
+ .long 1039293264
+ .long 3489660928
+ .long 70401
+ .long 3651174602
+ .long 1040488175
+ .long 2927624192
+ .long 82586
+ .long 3073892131
+ .long 1042240606
+ .long 1006632960
+ .long 94904
+ .long 1328391742
+ .long 1042019037
+ .long 3942645760
+ .long 107355
+ .long 2650893825
+ .long 1041903210
+ .long 822083584
+ .long 119943
+ .long 2397289153
+ .long 1041802037
+ .long 2281701376
+ .long 132667
+ .long 430997175
+ .long 1042110606
+ .long 1845493760
+ .long 145530
+ .long 1230936525
+ .long 1041801015
+ .long 1702887424
+ .long 158533
+ .long 740675935
+ .long 1040178913
+ .long 4110417920
+ .long 171677
+ .long 3489810261
+ .long 1041825986
+ .long 2793406464
+ .long 184965
+ .long 2532600530
+ .long 1040767882
+ .long 167772160
+ .long 198398
+ .long 3542557060
+ .long 1041827263
+ .long 2986344448
+ .long 211976
+ .long 1401563777
+ .long 1041061093
+ .long 922746880
+ .long 225703
+ .long 3129406026
+ .long 1041852413
+ .long 880803840
+ .long 239579
+ .long 900993572
+ .long 1039283234
+ .long 1275068416
+ .long 253606
+ .long 2115029358
+ .long 1042140042
+ .long 562036736
+ .long 267786
+ .long 1086643152
+ .long 1041785419
+ .long 1610612736
+ .long 282120
+ .long 82864366
+ .long 1041256244
+ .long 3045064704
+ .long 296610
+ .long 2392968152
+ .long 1040913683
+ .long 3573547008
+ .long 311258
+ .long 2905856183
+ .long 1040002214
+ .long 1988100096
+ .long 326066
+ .long 3742008261
+ .long 1040011137
+ .long 1451229184
+ .long 341035
+ .long 863393794
+ .long 1040880621
+ .long 914358272
+ .long 356167
+ .long 1446136837
+ .long 1041372426
+ .long 3707764736
+ .long 371463
+ .long 927855201
+ .long 1040617636
+ .long 360710144
+ .long 386927
+ .long 1492679939
+ .long 1041050306
+ .long 2952790016
+ .long 402558
+ .long 608827001
+ .long 1041582217
+ .long 2181038080
+ .long 418360
+ .long 606260204
+ .long 1042271987
+ .long 1711276032
+ .long 434334
+ .long 3163044019
+ .long 1041843851
+ .long 1006632960
+ .long 450482
+ .long 4148747325
+ .long 1041962972
+ .long 3900702720
+ .long 466805
+ .long 802924201
+ .long 1041275378
+ .long 1442840576
+ .long 483307
+ .long 3052749833
+ .long 1041940577
+ .long 1937768448
+ .long 499988
+ .long 2216116399
+ .long 1041486744
+ .long 914358272
+ .long 516851
+ .long 2729697836
+ .long 1041445764
+ .long 2566914048
+ .long 533897
+ .long 540608356
+ .long 1041310907
+ .long 2600468480
+ .long 551129
+ .long 2916344493
+ .long 1040535661
+ .long 1107296256
+ .long 568549
+ .long 731391814
+ .long 1039497014
+ .long 2566914048
+ .long 586158
+ .long 1024722704
+ .long 1041461625
+ .long 2961178624
+ .long 603959
+ .long 3806831748
+ .long 1041732499
+ .long 2675965952
+ .long 621954
+ .long 238953304
+ .long 1040316488
+ .long 2189426688
+ .long 640145
+ .long 749123235
+ .long 1041725785
+ .long 2063597568
+ .long 658534
+ .long 1168187977
+ .long 1041175214
+ .long 2986344448
+ .long 677123
+ .long 3506096399
+ .long 1042186095
+ .long 1426063360
+ .long 695915
+ .long 1470221620
+ .long 1041675499
+ .long 2566914048
+ .long 714911
+ .long 3182425146
+ .long 1041483134
+ .long 3087007744
+ .long 734114
+ .long 3131698208
+ .long 1042208657
+ .long 4068474880
+ .long 753526
+ .long 2300504125
+ .long 1041428596
+ .long 2415919104
+ .long 773150
+ .long 2290297931
+ .long 1037388400
+ .long 3716153344
+ .long 792987
+ .long 3532148223
+ .long 1041626194
+ .long 771751936
+ .long 813041
+ .long 1161884404
+ .long 1042015258
+ .long 3699376128
+ .long 833312
+ .long 876383176
+ .long 1037968878
+ .long 1241513984
+ .long 853805
+ .long 3379986796
+ .long 1042213153
+ .long 3699376128
+ .long 874520
+ .long 1545797737
+ .long 1041681569
+ .long 58720256
+ .long 895462
+ .long 2925146801
+ .long 1042212567
+ .long 855638016
+ .long 916631
+ .long 1316627971
+ .long 1038516204
+ .long 3883925504
+ .long 938030
+ .long 3267869137
+ .long 1040337004
+ .long 2726297600
+ .long 959663
+ .long 3720868999
+ .long 1041782409
+ .long 3992977408
+ .long 981531
+ .long 433316142
+ .long 1041994064
+ .long 1526726656
+ .long 1003638
+ .long 781232103
+ .long 1040093400
+ .long 2172649472
+ .long 1025985
+ .type Tbl_addr,@object
+ .size Tbl_addr,1024
+ .align 16
+mmask:
+ .long 4294967232
+ .long 0
+ .long 4294967232
+ .long 0
+ .type mmask,@object
+ .size mmask,16
+ .align 16
+bias:
+ .long 65472
+ .long 0
+ .long 65472
+ .long 0
+ .type bias,@object
+ .size bias,16
+ .align 16
+emask:
+ .long 0
+ .long 4293918720
+ .long 0
+ .long 4293918720
+ .type emask,@object
+ .size emask,16
+ .align 16
+cvl:
+ .long 2773927732
+ .long 1053236707
+ .long 381774871
+ .long 1062650220
+ .long 379653899
+ .long 1056571845
+ .long 286331153
+ .long 1065423121
+ .long 436314138
+ .long 1059717536
+ .long 1431655765
+ .long 1067799893
+ .long 1431655765
+ .long 1069897045
+ .long 0
+ .long 1071644672
+ .type cvl,@object
+ .size cvl,64
+ .align 8
+XMAX:
+ .long 4294967295
+ .long 2146435071
+ .type XMAX,@object
+ .size XMAX,8
+ .align 8
+INF:
+ .long 0
+ .long 2146435072
+ .type INF,@object
+ .size INF,8
+ .align 8
+HIGHMASK:
+ .long 4227858432
+ .long 4294967295
+ .type HIGHMASK,@object
+ .size HIGHMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_expm1.1-.
+ .4byte ..___tag_value_expm1.5-..___tag_value_expm1.1
+ .2byte 0x0400
+ .4byte ..___tag_value_expm1.3-..___tag_value_expm1.1
+ .2byte 0x400e
+ .byte 0x04
+ .4byte ..___tag_value_expm1.4-..___tag_value_expm1.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/s_log1p.S b/libm/x86_64/s_log1p.S
new file mode 100644
index 0000000..1ff2d39
--- /dev/null
+++ b/libm/x86_64/s_log1p.S
@@ -0,0 +1,829 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Let x=2^k * mx, mx in [1,2)
+//
+// Get B~1/mx based on the output of rcpps instruction (B0)
+// B = int((B0*2^7+0.5))/2^7
+//
+// Reduced argument: r=B*mx-1.0 (computed accurately in high and low parts)
+//
+// Result: k*log(2) - log(B) + p(r)
+// p(r) is a degree 7 polynomial
+// -log(B) read from data table (high, low parts)
+// Result is formed from high and low parts
+//
+// Special cases:
+// log1p(NaN) = quiet NaN, and raise invalid exception
+// log1p(+INF) = that INF
+// log1p(x) = NaN if x < -1 or x = -INF, and raises invalid exception
+// log1p(-1) = -INF, and raises divide-by-zero exception
+// log1p(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin log1p
+ENTRY(log1p)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_log1p.1:
+ subq $24, %rsp
+..___tag_value_log1p.3:
+ movsd %xmm0, 8(%rsp)
+..B1.2:
+ movq $0x3ff0000000000000, %rax
+ movd %rax, %xmm2
+ xorpd %xmm3, %xmm3
+ movl $32768, %ecx
+ movd %rcx, %xmm4
+ movq $0xffffe00000000000, %r8
+ movd %r8, %xmm5
+ movddup %xmm0, %xmm7
+ pshufd $68, %xmm2, %xmm6
+ pextrw $3, %xmm0, %ecx
+ addsd %xmm2, %xmm0
+ movq %xmm0, %xmm1
+ pextrw $3, %xmm0, %eax
+ subsd %xmm0, %xmm6
+ orpd %xmm2, %xmm0
+ psrlq $27, %xmm0
+ lea L_tbl(%rip), %r11
+ psrld $2, %xmm0
+ subl $16, %eax
+ cmpl $32736, %eax
+ jae .L_2TAG_PACKET_0.0.2
+ addsd %xmm6, %xmm7
+ rcpps %xmm0, %xmm0
+ psllq $12, %xmm1
+ pshufd $228, %xmm5, %xmm6
+ psrlq $12, %xmm1
+ andl $32752, %ecx
+ cmpl $16256, %ecx
+ jb .L_2TAG_PACKET_1.0.2
+ andl $32752, %eax
+ movl $32720, %ecx
+ subl %eax, %ecx
+ pinsrw $3, %ecx, %xmm3
+.L_2TAG_PACKET_2.0.2:
+ mulsd %xmm3, %xmm7
+ paddd %xmm4, %xmm0
+ movq $0x3800000000000000, %rcx
+ movd %rcx, %xmm4
+ orpd %xmm2, %xmm1
+ movd %xmm0, %edx
+ psllq $29, %xmm0
+ andpd %xmm1, %xmm5
+ andpd %xmm6, %xmm0
+ subsd %xmm5, %xmm1
+ paddd %xmm4, %xmm0
+ mulsd %xmm0, %xmm5
+ movl $16352, %ecx
+ subl %ecx, %eax
+ cvtsi2sd %eax, %xmm4
+ mulsd %xmm0, %xmm7
+ mulsd %xmm0, %xmm1
+ movq log2(%rip), %xmm6
+ movapd coeff(%rip), %xmm3
+ subsd %xmm2, %xmm5
+ andl $16711680, %edx
+ shrl $12, %edx
+ movapd (%r11,%rdx), %xmm0
+ movapd 16+coeff(%rip), %xmm2
+ addsd %xmm5, %xmm1
+ movq %xmm1, %xmm5
+ addsd %xmm7, %xmm1
+ subsd %xmm1, %xmm5
+ addsd %xmm5, %xmm7
+ mulsd %xmm4, %xmm6
+ mulsd 8+log2(%rip), %xmm4
+ mulsd %xmm1, %xmm3
+ movddup %xmm1, %xmm5
+ addsd %xmm6, %xmm0
+ mulpd %xmm5, %xmm2
+ mulpd %xmm5, %xmm5
+ movddup %xmm0, %xmm6
+ addsd %xmm1, %xmm0
+ addpd 32+coeff(%rip), %xmm2
+ mulpd %xmm5, %xmm3
+ subsd %xmm0, %xmm6
+ mulsd %xmm1, %xmm2
+ addsd %xmm7, %xmm4
+ mulsd %xmm1, %xmm7
+ addsd %xmm6, %xmm1
+ pshufd $238, %xmm0, %xmm6
+ mulsd %xmm5, %xmm5
+ addsd %xmm6, %xmm4
+ subsd %xmm7, %xmm1
+ addpd %xmm3, %xmm2
+ addsd %xmm4, %xmm1
+ mulpd %xmm5, %xmm2
+ addsd %xmm2, %xmm1
+ pshufd $238, %xmm2, %xmm5
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_0.0.2:
+ movq 8(%rsp), %xmm0
+ movq 8(%rsp), %xmm1
+ addl $16, %eax
+ cmpl $32768, %eax
+ jae .L_2TAG_PACKET_3.0.2
+ cmpl $0, %eax
+ je .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_5.0.2:
+ addsd %xmm0, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_6.0.2:
+ ja .L_2TAG_PACKET_5.0.2
+ cmpl $0, %edx
+ ja .L_2TAG_PACKET_5.0.2
+ jmp .L_2TAG_PACKET_7.0.2
+.L_2TAG_PACKET_3.0.2:
+ movd %xmm1, %edx
+ psrlq $32, %xmm1
+ movd %xmm1, %ecx
+ addl %ecx, %ecx
+ cmpl $-2097152, %ecx
+ jae .L_2TAG_PACKET_6.0.2
+ orl %ecx, %edx
+ cmpl $0, %edx
+ je .L_2TAG_PACKET_4.0.2
+.L_2TAG_PACKET_7.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $32752, %eax
+ pinsrw $3, %eax, %xmm1
+ movl $141, (%rsp)
+ mulsd %xmm1, %xmm0
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_4.0.2:
+ xorpd %xmm1, %xmm1
+ xorpd %xmm0, %xmm0
+ movl $49136, %eax
+ pinsrw $3, %eax, %xmm0
+ divsd %xmm1, %xmm0
+ movl $140, (%rsp)
+ jmp .L_2TAG_PACKET_8.0.2
+.L_2TAG_PACKET_1.0.2:
+ movq 8(%rsp), %xmm0
+ cmpl $15504, %ecx
+ jb .L_2TAG_PACKET_9.0.2
+ movapd coeff2(%rip), %xmm1
+ pshufd $68, %xmm0, %xmm0
+ movapd 16+coeff2(%rip), %xmm2
+ pshufd $68, %xmm0, %xmm4
+ movapd 32+coeff2(%rip), %xmm3
+ mulpd %xmm0, %xmm1
+ xorpd %xmm6, %xmm6
+ mulpd %xmm4, %xmm4
+ addpd %xmm2, %xmm1
+ pshufd $68, %xmm4, %xmm5
+ mulpd %xmm0, %xmm4
+ movl $49120, %eax
+ pinsrw $3, %eax, %xmm6
+ mulpd %xmm0, %xmm1
+ mulsd %xmm4, %xmm4
+ addpd %xmm3, %xmm1
+ mulsd %xmm6, %xmm5
+ mulpd %xmm4, %xmm1
+ pshufd $238, %xmm1, %xmm7
+ addsd %xmm7, %xmm1
+ addsd %xmm5, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.5
+.L_2TAG_PACKET_9.0.2:
+ cmpl $16, %ecx
+ jb .L_2TAG_PACKET_10.0.2
+ jmp ..B1.5
+.L_2TAG_PACKET_10.0.2:
+ movq %xmm0, %xmm1
+ mulsd %xmm1, %xmm1
+ jmp ..B1.5
+.L_2TAG_PACKET_8.0.2:
+ movq %xmm0, 16(%rsp)
+..B1.3:
+ movq 16(%rsp), %xmm0
+.L_2TAG_PACKET_11.0.2:
+..B1.5:
+ addq $24, %rsp
+..___tag_value_log1p.4:
+ ret
+..___tag_value_log1p.5:
+END(log1p)
+# -- End log1p
+ .section .rodata, "a"
+ .align 16
+ .align 16
+L_tbl:
+ .long 4277811200
+ .long 1072049730
+ .long 2479318832
+ .long 1026487127
+ .long 2854492160
+ .long 1072033410
+ .long 215631550
+ .long 1025638968
+ .long 1547061248
+ .long 1072017216
+ .long 2886781435
+ .long 1026423395
+ .long 649825280
+ .long 1072001146
+ .long 4281533405
+ .long 1024038923
+ .long 646346752
+ .long 1071985198
+ .long 1562735921
+ .long 1023790276
+ .long 2203734016
+ .long 1071969370
+ .long 1838397691
+ .long 3173936209
+ .long 1872169984
+ .long 1071953661
+ .long 3981202460
+ .long 1022325013
+ .long 669557760
+ .long 1071938069
+ .long 4182597802
+ .long 3173174122
+ .long 4076413952
+ .long 1071922591
+ .long 1209029111
+ .long 3170736207
+ .long 556125184
+ .long 1071907228
+ .long 821086028
+ .long 3173437049
+ .long 204914688
+ .long 1071891976
+ .long 2097025986
+ .long 3171071798
+ .long 387545088
+ .long 1071876834
+ .long 3142936996
+ .long 3173092218
+ .long 2912783360
+ .long 1071861800
+ .long 2502420140
+ .long 1024505919
+ .long 1144260608
+ .long 1071846874
+ .long 3315658140
+ .long 3173469843
+ .long 1471209472
+ .long 1071832053
+ .long 129621009
+ .long 3172443877
+ .long 1829683200
+ .long 1071817336
+ .long 3885467693
+ .long 1025535275
+ .long 288676864
+ .long 1071802722
+ .long 86139472
+ .long 3171639793
+ .long 3636378624
+ .long 1071788208
+ .long 1850238587
+ .long 1024654342
+ .long 1606817792
+ .long 1071773795
+ .long 3388899795
+ .long 3173675586
+ .long 1236164608
+ .long 1071759480
+ .long 3983599207
+ .long 1020046558
+ .long 1089616896
+ .long 1071745262
+ .long 4171974224
+ .long 1024773198
+ .long 4143093760
+ .long 1071731139
+ .long 2727587401
+ .long 3173965207
+ .long 600267776
+ .long 1071717112
+ .long 3147685042
+ .long 3173353031
+ .long 2249313280
+ .long 1071703177
+ .long 125835074
+ .long 1025255832
+ .long 3805303808
+ .long 1071689334
+ .long 2289991207
+ .long 1025460331
+ .long 87278592
+ .long 1071675583
+ .long 1106114045
+ .long 1025933602
+ .long 3195405312
+ .long 1071661920
+ .long 3885316576
+ .long 3171206239
+ .long 3853649920
+ .long 1071648346
+ .long 2977069852
+ .long 3171236771
+ .long 2944026624
+ .long 1071625048
+ .long 1008093493
+ .long 1023444474
+ .long 3993180160
+ .long 1071598247
+ .long 1862355595
+ .long 1024642533
+ .long 1454641152
+ .long 1071571617
+ .long 1514603089
+ .long 1026500596
+ .long 3286085632
+ .long 1071545154
+ .long 1400028424
+ .long 3173279056
+ .long 438773760
+ .long 1071518858
+ .long 120727864
+ .long 3172148914
+ .long 1212979200
+ .long 1071492725
+ .long 1625055594
+ .long 3172901933
+ .long 1189017600
+ .long 1071466754
+ .long 3920062376
+ .long 1025727407
+ .long 403064832
+ .long 1071440943
+ .long 1053271728
+ .long 3171391427
+ .long 3343210496
+ .long 1071415289
+ .long 3243395502
+ .long 3173627613
+ .long 1765777408
+ .long 1071389792
+ .long 2145968512
+ .long 1026354304
+ .long 461430784
+ .long 1071364449
+ .long 4094322285
+ .long 1026021467
+ .long 71706624
+ .long 1071339258
+ .long 763632021
+ .long 1024496933
+ .long 1380503552
+ .long 1071314217
+ .long 1383547992
+ .long 3173088453
+ .long 1015732224
+ .long 1071289325
+ .long 3198646877
+ .long 1025390322
+ .long 35977216
+ .long 1071264580
+ .long 2141026805
+ .long 1025754693
+ .long 3927306240
+ .long 1071239979
+ .long 282116272
+ .long 3173394334
+ .long 1125341184
+ .long 1071215523
+ .long 2768427504
+ .long 3172279059
+ .long 1666971648
+ .long 1071191208
+ .long 786837629
+ .long 3172427445
+ .long 2827694080
+ .long 1071167033
+ .long 3857122416
+ .long 3173014241
+ .long 2003683328
+ .long 1071142997
+ .long 859010954
+ .long 1026545007
+ .long 1004017664
+ .long 1071119098
+ .long 3356644970
+ .long 3173458064
+ .long 1753020416
+ .long 1071095334
+ .long 788338552
+ .long 1026157693
+ .long 1992718336
+ .long 1071071704
+ .long 1239179443
+ .long 1026394889
+ .long 3870234624
+ .long 1071048206
+ .long 2082614663
+ .long 1024926053
+ .long 1050437632
+ .long 1071024840
+ .long 660007840
+ .long 1025548499
+ .long 188395520
+ .long 1071001603
+ .long 3878792704
+ .long 3173889571
+ .long 3747176448
+ .long 1070978493
+ .long 144991708
+ .long 3171552042
+ .long 1405669376
+ .long 1070955511
+ .long 3999088879
+ .long 1025486317
+ .long 121151488
+ .long 1070932654
+ .long 2170865497
+ .long 1026473584
+ .long 2652319744
+ .long 1070909920
+ .long 453695652
+ .long 3173916809
+ .long 3262236672
+ .long 1070887309
+ .long 157800053
+ .long 3173984206
+ .long 601221120
+ .long 1070864820
+ .long 3968917661
+ .long 1023992886
+ .long 1999843328
+ .long 1070842450
+ .long 3053895004
+ .long 1024998228
+ .long 1992167424
+ .long 1070820199
+ .long 2968614856
+ .long 1024552653
+ .long 3788726272
+ .long 1070798065
+ .long 3542170808
+ .long 3173573242
+ .long 2094829568
+ .long 1070776048
+ .long 1246758132
+ .long 1026202874
+ .long 288675840
+ .long 1070754146
+ .long 3747328950
+ .long 1026331585
+ .long 1829681152
+ .long 1070732357
+ .long 3125197546
+ .long 1024100318
+ .long 1666869248
+ .long 1070710681
+ .long 1363656119
+ .long 1026336493
+ .long 3417110528
+ .long 1070689116
+ .long 4154791553
+ .long 1026267853
+ .long 2183653376
+ .long 1070667662
+ .long 1671819292
+ .long 3173785870
+ .long 1734434816
+ .long 1070646317
+ .long 373091049
+ .long 1025972363
+ .long 1615681536
+ .long 1070625080
+ .long 384650897
+ .long 1022926043
+ .long 1445382144
+ .long 1070603950
+ .long 344320330
+ .long 3172397196
+ .long 1823715328
+ .long 1070569756
+ .long 3389841200
+ .long 1025231852
+ .long 3839688704
+ .long 1070527917
+ .long 1706790417
+ .long 3167363349
+ .long 4293332992
+ .long 1070486286
+ .long 1614935088
+ .long 1019351591
+ .long 2966720512
+ .long 1070444861
+ .long 4145393717
+ .long 3173711658
+ .long 4066729984
+ .long 1070403639
+ .long 1974925028
+ .long 3171437182
+ .long 3337621504
+ .long 1070362619
+ .long 3314953170
+ .long 3169971314
+ .long 943448064
+ .long 1070321799
+ .long 1498682038
+ .long 3173862340
+ .long 1465634816
+ .long 1070281176
+ .long 1319952810
+ .long 3171693965
+ .long 1015734272
+ .long 1070240749
+ .long 1347821929
+ .long 3173544515
+ .long 118001664
+ .long 1070200516
+ .long 1751482746
+ .long 1026134093
+ .long 3707174912
+ .long 1070160474
+ .long 1486946159
+ .long 1023930920
+ .long 3946381312
+ .long 1070120623
+ .long 2867408081
+ .long 3171368276
+ .long 1699848192
+ .long 1070080961
+ .long 2590187139
+ .long 1025379803
+ .long 2235846656
+ .long 1070041485
+ .long 1888568069
+ .long 3172754960
+ .long 2339729408
+ .long 1070002194
+ .long 3852214753
+ .long 3173323149
+ .long 3196850176
+ .long 1069963086
+ .long 742141560
+ .long 1025101707
+ .long 1800683520
+ .long 1069924160
+ .long 3949500444
+ .long 3172102179
+ .long 3835801600
+ .long 1069885413
+ .long 3848895943
+ .long 1025913832
+ .long 2201202688
+ .long 1069846845
+ .long 1425913464
+ .long 1025868665
+ .long 2778279936
+ .long 1069808453
+ .long 2120889677
+ .long 3173831128
+ .long 2954203136
+ .long 1069770236
+ .long 592147081
+ .long 1019621288
+ .long 210141184
+ .long 1069732193
+ .long 3414275233
+ .long 1023647084
+ .long 709476352
+ .long 1069694321
+ .long 2413027164
+ .long 1024462115
+ .long 2116284416
+ .long 1069656619
+ .long 1144559924
+ .long 1026336654
+ .long 2183651328
+ .long 1069619086
+ .long 3459057650
+ .long 1025634168
+ .long 3047047168
+ .long 1069581720
+ .long 1879674924
+ .long 3173508573
+ .long 970711040
+ .long 1069541521
+ .long 1335954173
+ .long 3173332182
+ .long 2198478848
+ .long 1069467449
+ .long 2951103968
+ .long 3173892200
+ .long 1669611520
+ .long 1069393703
+ .long 531044147
+ .long 1025149248
+ .long 29114368
+ .long 1069320280
+ .long 3327831251
+ .long 1025918673
+ .long 2376949760
+ .long 1069247176
+ .long 737634533
+ .long 3172176000
+ .long 1085390848
+ .long 1069174390
+ .long 3108243400
+ .long 3171828406
+ .long 1566130176
+ .long 1069101918
+ .long 985483226
+ .long 1025708380
+ .long 792780800
+ .long 1069029758
+ .long 4184866295
+ .long 1024426204
+ .long 183156736
+ .long 1068957907
+ .long 2845699378
+ .long 1022107277
+ .long 1301782528
+ .long 1068886362
+ .long 1012735262
+ .long 3173804294
+ .long 1562411008
+ .long 1068815121
+ .long 2197086703
+ .long 3170187813
+ .long 2815549440
+ .long 1068744181
+ .long 2782613207
+ .long 1026345054
+ .long 2756124672
+ .long 1068673540
+ .long 2929486205
+ .long 3173037800
+ .long 3511050240
+ .long 1068603195
+ .long 1443733147
+ .long 3173331549
+ .long 3047047168
+ .long 1068533144
+ .long 1879674924
+ .long 3172459997
+ .long 3221667840
+ .long 1068427825
+ .long 1338588027
+ .long 3171815742
+ .long 3453861888
+ .long 1068288883
+ .long 1205348359
+ .long 3172624626
+ .long 3506110464
+ .long 1068150514
+ .long 893105198
+ .long 1025571866
+ .long 346013696
+ .long 1068012714
+ .long 3495569021
+ .long 3172563349
+ .long 4074029056
+ .long 1067875476
+ .long 3961106338
+ .long 3171065595
+ .long 3559784448
+ .long 1067738798
+ .long 1975385384
+ .long 3173783155
+ .long 797769728
+ .long 1067602675
+ .long 3760305787
+ .long 1026047642
+ .long 2313633792
+ .long 1067467101
+ .long 1559353171
+ .long 1023480256
+ .long 3960766464
+ .long 1067213778
+ .long 1067365107
+ .long 1025865926
+ .long 684261376
+ .long 1066944805
+ .long 844762164
+ .long 3173687482
+ .long 630718464
+ .long 1066676905
+ .long 2458269694
+ .long 1024033081
+ .long 1486061568
+ .long 1066410070
+ .long 115537874
+ .long 3173243995
+ .long 2743664640
+ .long 1065886792
+ .long 3665098304
+ .long 3173471607
+ .long 1971912704
+ .long 1065357333
+ .long 2577214440
+ .long 3171993451
+ .long 1498939392
+ .long 1064306693
+ .long 3409036923
+ .long 1025599151
+ .long 0
+ .long 0
+ .long 0
+ .long 2147483648
+ .type L_tbl,@object
+ .size L_tbl,2064
+ .align 16
+log2:
+ .long 4277811200
+ .long 1067855426
+ .long 2479318832
+ .long 1022292823
+ .type log2,@object
+ .size log2,16
+ .align 16
+coeff:
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1030730101
+ .long 3217380702
+ .long 1431655765
+ .long 1070945621
+ .long 2576980378
+ .long 1070176665
+ .long 0
+ .long 3219128320
+ .type coeff,@object
+ .size coeff,48
+ .align 16
+coeff2:
+ .long 0
+ .long 3217031168
+ .long 2576980378
+ .long 1070176665
+ .long 2454267026
+ .long 1069697316
+ .long 0
+ .long 3218079744
+ .long 1431655765
+ .long 3217380693
+ .long 1431655765
+ .long 1070945621
+ .type coeff2,@object
+ .size coeff2,48
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_log1p.1-.
+ .4byte ..___tag_value_log1p.5-..___tag_value_log1p.1
+ .2byte 0x0400
+ .4byte ..___tag_value_log1p.3-..___tag_value_log1p.1
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_log1p.4-..___tag_value_log1p.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/s_sin.S b/libm/x86_64/s_sin.S
new file mode 100644
index 0000000..2f93a34
--- /dev/null
+++ b/libm/x86_64/s_sin.S
@@ -0,0 +1,1300 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// 1. RANGE REDUCTION
+//
+// We perform an initial range reduction from X to r with
+//
+// X =~= N * pi/32 + r
+//
+// so that |r| <= pi/64 + epsilon. We restrict inputs to those
+// where |N| <= 932560. Beyond this, the range reduction is
+// insufficiently accurate. For extremely small inputs,
+// denormalization can occur internally, impacting performance.
+// This means that the main path is actually only taken for
+// 2^-252 <= |X| < 90112.
+//
+// To avoid branches, we perform the range reduction to full
+// accuracy each time.
+//
+// X - N * (P_1 + P_2 + P_3)
+//
+// where P_1 and P_2 are 32-bit numbers (so multiplication by N
+// is exact) and P_3 is a 53-bit number. Together, these
+// approximate pi well enough for all cases in the restricted
+// range.
+//
+// The main reduction sequence is:
+//
+// y = 32/pi * x
+// N = integer(y)
+// (computed by adding and subtracting off SHIFTER)
+//
+// m_1 = N * P_1
+// m_2 = N * P_2
+// r_1 = x - m_1
+// r = r_1 - m_2
+// (this r can be used for most of the calculation)
+//
+// c_1 = r_1 - r
+// m_3 = N * P_3
+// c_2 = c_1 - m_2
+// c = c_2 - m_3
+//
+// 2. MAIN ALGORITHM
+//
+// The algorithm uses a table lookup based on B = M * pi / 32
+// where M = N mod 64. The stored values are:
+// sigma closest power of 2 to cos(B)
+// C_hl 53-bit cos(B) - sigma
+// S_hi + S_lo 2 * 53-bit sin(B)
+//
+// The computation is organized as follows:
+//
+// sin(B + r + c) = [sin(B) + sigma * r] +
+// r * (cos(B) - sigma) +
+// sin(B) * [cos(r + c) - 1] +
+// cos(B) * [sin(r + c) - r]
+//
+// which is approximately:
+//
+// [S_hi + sigma * r] +
+// C_hl * r +
+// S_lo + S_hi * [(cos(r) - 1) - r * c] +
+// (C_hl + sigma) * [(sin(r) - r) + c]
+//
+// and this is what is actually computed. We separate this sum
+// into four parts:
+//
+// hi + med + pols + corr
+//
+// where
+//
+// hi = S_hi + sigma r
+// med = C_hl * r
+// pols = S_hi * (cos(r) - 1) + (C_hl + sigma) * (sin(r) - r)
+// corr = S_lo + c * ((C_hl + sigma) - S_hi * r)
+//
+// 3. POLYNOMIAL
+//
+// The polynomial S_hi * (cos(r) - 1) + (C_hl + sigma) *
+// (sin(r) - r) can be rearranged freely, since it is quite
+// small, so we exploit parallelism to the fullest.
+//
+// psc4 = SC_4 * r_1
+// msc4 = psc4 * r
+// r2 = r * r
+// msc2 = SC_2 * r2
+// r4 = r2 * r2
+// psc3 = SC_3 + msc4
+// psc1 = SC_1 + msc2
+// msc3 = r4 * psc3
+// sincospols = psc1 + msc3
+// pols = sincospols *
+// <S_hi * r^2 | (C_hl + sigma) * r^3>
+//
+// 4. CORRECTION TERM
+//
+// This is where the "c" component of the range reduction is
+// taken into account; recall that just "r" is used for most of
+// the calculation.
+//
+// -c = m_3 - c_2
+// -d = S_hi * r - (C_hl + sigma)
+// corr = -c * -d + S_lo
+//
+// 5. COMPENSATED SUMMATIONS
+//
+// The two successive compensated summations add up the high
+// and medium parts, leaving just the low parts to add up at
+// the end.
+//
+// rs = sigma * r
+// res_int = S_hi + rs
+// k_0 = S_hi - res_int
+// k_2 = k_0 + rs
+// med = C_hl * r
+// res_hi = res_int + med
+// k_1 = res_int - res_hi
+// k_3 = k_1 + med
+//
+// 6. FINAL SUMMATION
+//
+// We now add up all the small parts:
+//
+// res_lo = pols(hi) + pols(lo) + corr + k_1 + k_3
+//
+// Now the overall result is just:
+//
+// res_hi + res_lo
+//
+// 7. SMALL ARGUMENTS
+//
+// If |x| < SNN (SNN meaning the smallest normal number), we
+// simply perform 0.1111111 cdots 1111 * x. For SNN <= |x|, we
+// do 2^-55 * (2^55 * x - x).
+//
+// Special cases:
+// sin(NaN) = quiet NaN, and raise invalid exception
+// sin(INF) = NaN and raise invalid exception
+// sin(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin sin
+ENTRY(sin)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_sin.1:
+ pushq %rbx
+..___tag_value_sin.3:
+ subq $16, %rsp
+..___tag_value_sin.5:
+ movsd %xmm0, 8(%rsp)
+..B1.2:
+ movl 12(%rsp), %eax
+ movq PI32INV(%rip), %xmm1
+ movq SHIFTER(%rip), %xmm2
+ andl $2147418112, %eax
+ subl $808452096, %eax
+ cmpl $281346048, %eax
+ ja .L_2TAG_PACKET_0.0.1
+ mulsd %xmm0, %xmm1
+ movapd ONEHALF(%rip), %xmm5
+ movq SIGN_MASK(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %edx
+ cvtsi2sd %edx, %xmm1
+ movapd P_2(%rip), %xmm6
+ movq $0x3fb921fb54400000, %r8
+ movd %r8, %xmm3
+ movapd SC_4(%rip), %xmm5
+ pshufd $68, %xmm0, %xmm4
+ mulsd %xmm1, %xmm3
+ movddup %xmm1, %xmm1
+ andl $63, %edx
+ shll $5, %edx
+ lea Ctable(%rip), %rax
+ addq %rdx, %rax
+ mulpd %xmm1, %xmm6
+ mulsd P_3(%rip), %xmm1
+ subsd %xmm3, %xmm4
+ movq 8(%rax), %xmm7
+ subsd %xmm3, %xmm0
+ movddup %xmm4, %xmm3
+ subsd %xmm6, %xmm4
+ pshufd $68, %xmm0, %xmm0
+ movapd (%rax), %xmm2
+ mulpd %xmm0, %xmm5
+ subpd %xmm6, %xmm0
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm6, %xmm3
+ movapd SC_2(%rip), %xmm6
+ subsd %xmm3, %xmm1
+ movq 24(%rax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd SC_3(%rip), %xmm5
+ mulsd (%rax), %xmm4
+ addpd SC_1(%rip), %xmm6
+ mulpd %xmm0, %xmm5
+ movq %xmm3, %xmm0
+ addsd 8(%rax), %xmm3
+ mulpd %xmm7, %xmm1
+ movq %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movq 8(%rax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%rax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm0, %xmm5
+ addsd %xmm7, %xmm3
+ addsd %xmm5, %xmm1
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ unpckhpd %xmm6, %xmm6
+ movq %xmm4, %xmm0
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_0.0.1:
+ jg .L_2TAG_PACKET_1.0.1
+ shrl $20, %eax
+ cmpw $3325, %ax
+ jne .L_2TAG_PACKET_2.0.1
+ mulsd ALL_ONES(%rip), %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_2.0.1:
+ movq TWO_POW_55(%rip), %xmm3
+ mulsd %xmm0, %xmm3
+ subsd %xmm0, %xmm3
+ mulsd TWO_POW_M55(%rip), %xmm3
+ jmp ..B1.4
+.L_2TAG_PACKET_1.0.1:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_3.0.1
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ subl $16224, %ecx
+ shrl $7, %ecx
+ andl $65532, %ecx
+ lea PI_INV_TABLE(%rip), %r11
+ addq %r11, %rcx
+ movd %xmm0, %rax
+ movl 20(%rcx), %r10d
+ movl 24(%rcx), %r8d
+ movl %eax, %edx
+ shrq $21, %rax
+ orl $-2147483648, %eax
+ shrl $11, %eax
+ movl %r10d, %r9d
+ imulq %rdx, %r10
+ imulq %rax, %r9
+ imulq %rax, %r8
+ movl 16(%rcx), %esi
+ movl 12(%rcx), %edi
+ movl %r10d, %r11d
+ shrq $32, %r10
+ addq %r10, %r9
+ addq %r8, %r11
+ movl %r11d, %r8d
+ shrq $32, %r11
+ addq %r11, %r9
+ movl %esi, %r10d
+ imulq %rdx, %rsi
+ imulq %rax, %r10
+ movl %edi, %r11d
+ imulq %rdx, %rdi
+ movl %esi, %ebx
+ shrq $32, %rsi
+ addq %rbx, %r9
+ movl %r9d, %ebx
+ shrq $32, %r9
+ addq %rsi, %r10
+ addq %r9, %r10
+ shlq $32, %rbx
+ orq %rbx, %r8
+ imulq %rax, %r11
+ movl 8(%rcx), %r9d
+ movl 4(%rcx), %esi
+ movl %edi, %ebx
+ shrq $32, %rdi
+ addq %rbx, %r10
+ movl %r10d, %ebx
+ shrq $32, %r10
+ addq %rdi, %r11
+ addq %r10, %r11
+ movq %r9, %rdi
+ imulq %rdx, %r9
+ imulq %rax, %rdi
+ movl %r9d, %r10d
+ shrq $32, %r9
+ addq %r10, %r11
+ movl %r11d, %r10d
+ shrq $32, %r11
+ addq %r9, %rdi
+ addq %r11, %rdi
+ movq %rsi, %r9
+ imulq %rdx, %rsi
+ imulq %rax, %r9
+ shlq $32, %r10
+ orq %rbx, %r10
+ movl (%rcx), %eax
+ movl %esi, %r11d
+ shrq $32, %rsi
+ addq %r11, %rdi
+ movl %edi, %r11d
+ shrq $32, %rdi
+ addq %rsi, %r9
+ addq %rdi, %r9
+ imulq %rax, %rdx
+ pextrw $3, %xmm0, %ebx
+ lea PI_INV_TABLE(%rip), %rdi
+ subq %rdi, %rcx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl $19, %ecx
+ movl $32768, %esi
+ andl %ebx, %esi
+ shrl $4, %ebx
+ andl $2047, %ebx
+ subl $1023, %ebx
+ subl %ebx, %ecx
+ addq %rdx, %r9
+ movl %ecx, %edx
+ addl $32, %edx
+ cmpl $1, %ecx
+ jl .L_2TAG_PACKET_4.0.1
+ negl %ecx
+ addl $29, %ecx
+ shll %cl, %r9d
+ movl %r9d, %edi
+ andl $536870911, %r9d
+ testl $268435456, %r9d
+ jne .L_2TAG_PACKET_5.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+.L_2TAG_PACKET_6.0.1:
+.L_2TAG_PACKET_7.0.1:
+ cmpq $0, %r9
+ je .L_2TAG_PACKET_8.0.1
+.L_2TAG_PACKET_9.0.1:
+ bsr %r9, %r11
+ movl $29, %ecx
+ subl %r11d, %ecx
+ jle .L_2TAG_PACKET_10.0.1
+ shlq %cl, %r9
+ movq %r10, %rax
+ shlq %cl, %r10
+ addl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shrq %cl, %rax
+ shrq %cl, %r8
+ orq %rax, %r9
+ orq %r8, %r10
+.L_2TAG_PACKET_11.0.1:
+ cvtsi2sdq %r9, %xmm0
+ shrq $1, %r10
+ cvtsi2sdq %r10, %xmm3
+ xorpd %xmm4, %xmm4
+ shll $4, %edx
+ negl %edx
+ addl $16368, %edx
+ orl %esi, %edx
+ xorl %ebx, %edx
+ pinsrw $3, %edx, %xmm4
+ movq PI_4(%rip), %xmm2
+ movq 8+PI_4(%rip), %xmm6
+ xorpd %xmm5, %xmm5
+ subl $1008, %edx
+ pinsrw $3, %edx, %xmm5
+ mulsd %xmm4, %xmm0
+ shll $16, %esi
+ sarl $31, %esi
+ mulsd %xmm5, %xmm3
+ movq %xmm0, %xmm1
+ mulsd %xmm2, %xmm0
+ shrl $29, %edi
+ addsd %xmm3, %xmm1
+ mulsd %xmm2, %xmm3
+ addl %esi, %edi
+ xorl %esi, %edi
+ mulsd %xmm1, %xmm6
+ movl %edi, %eax
+ addsd %xmm3, %xmm6
+ movq %xmm0, %xmm2
+ addsd %xmm6, %xmm0
+ subsd %xmm0, %xmm2
+ addsd %xmm2, %xmm6
+.L_2TAG_PACKET_12.0.1:
+ movq PI32INV(%rip), %xmm1
+ mulsd %xmm0, %xmm1
+ movq ONEHALF(%rip), %xmm5
+ movq SIGN_MASK(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ cvttsd2si %xmm1, %edx
+ cvtsi2sd %edx, %xmm1
+ movq P_1(%rip), %xmm3
+ movapd P_2(%rip), %xmm2
+ mulsd %xmm1, %xmm3
+ unpcklpd %xmm1, %xmm1
+ shll $3, %eax
+ addl $1865216, %edx
+ movq %xmm0, %xmm4
+ addl %eax, %edx
+ andl $63, %edx
+ movapd SC_4(%rip), %xmm5
+ lea Ctable(%rip), %rax
+ shll $5, %edx
+ addq %rdx, %rax
+ mulpd %xmm1, %xmm2
+ subsd %xmm3, %xmm0
+ mulsd P_3(%rip), %xmm1
+ subsd %xmm3, %xmm4
+ movq 8(%rax), %xmm7
+ unpcklpd %xmm0, %xmm0
+ movq %xmm4, %xmm3
+ subsd %xmm2, %xmm4
+ mulpd %xmm0, %xmm5
+ subpd %xmm2, %xmm0
+ mulsd %xmm4, %xmm7
+ subsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm5
+ mulpd %xmm0, %xmm0
+ subsd %xmm2, %xmm3
+ movapd (%rax), %xmm2
+ subsd %xmm3, %xmm1
+ movq 24(%rax), %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm7
+ subsd %xmm6, %xmm1
+ movapd SC_2(%rip), %xmm6
+ mulsd %xmm4, %xmm2
+ mulpd %xmm0, %xmm6
+ mulsd %xmm4, %xmm3
+ mulpd %xmm0, %xmm2
+ mulpd %xmm0, %xmm0
+ addpd SC_3(%rip), %xmm5
+ mulsd (%rax), %xmm4
+ addpd SC_1(%rip), %xmm6
+ mulpd %xmm0, %xmm5
+ movq %xmm3, %xmm0
+ addsd 8(%rax), %xmm3
+ mulpd %xmm7, %xmm1
+ movq %xmm4, %xmm7
+ addsd %xmm3, %xmm4
+ addpd %xmm5, %xmm6
+ movq 8(%rax), %xmm5
+ subsd %xmm3, %xmm5
+ subsd %xmm4, %xmm3
+ addsd 16(%rax), %xmm1
+ mulpd %xmm2, %xmm6
+ addsd %xmm0, %xmm5
+ addsd %xmm7, %xmm3
+ addsd %xmm5, %xmm1
+ addsd %xmm3, %xmm1
+ addsd %xmm6, %xmm1
+ unpckhpd %xmm6, %xmm6
+ movq %xmm4, %xmm0
+ addsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_8.0.1:
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ movq $0, %r8
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_9.0.1
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_9.0.1
+ xorpd %xmm0, %xmm0
+ xorpd %xmm6, %xmm6
+ jmp .L_2TAG_PACKET_12.0.1
+.L_2TAG_PACKET_10.0.1:
+ je .L_2TAG_PACKET_11.0.1
+ negl %ecx
+ shrq %cl, %r10
+ movq %r9, %rax
+ shrq %cl, %r9
+ subl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shlq %cl, %rax
+ orq %rax, %r10
+ jmp .L_2TAG_PACKET_11.0.1
+.L_2TAG_PACKET_4.0.1:
+ negl %ecx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq %cl, %r9
+ movq %r9, %rdi
+ testl $-2147483648, %r9d
+ jne .L_2TAG_PACKET_13.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shrq $3, %rdi
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_5.0.1:
+ shrl %cl, %r9d
+ movl $536870912, %ebx
+ shrl %cl, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq $32, %rbx
+ addl $536870912, %edi
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ jmp .L_2TAG_PACKET_6.0.1
+.L_2TAG_PACKET_13.0.1:
+ shrl %cl, %r9d
+ movq $0x100000000, %rbx
+ shrq %cl, %rbx
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ shrq $3, %rdi
+ addl $536870912, %edi
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_3.0.1:
+ movq 8(%rsp), %xmm0
+ mulsd NEG_ZERO(%rip), %xmm0
+ movq %xmm0, (%rsp)
+.L_2TAG_PACKET_14.0.1:
+..B1.4:
+ addq $16, %rsp
+..___tag_value_sin.6:
+ popq %rbx
+..___tag_value_sin.8:
+ ret
+..___tag_value_sin.9:
+END(sin)
+# -- End sin
+ .section .rodata, "a"
+ .align 16
+ .align 16
+ONEHALF:
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .type ONEHALF,@object
+ .size ONEHALF,16
+ .align 16
+P_2:
+ .long 442499072
+ .long 1032893537
+ .long 442499072
+ .long 1032893537
+ .type P_2,@object
+ .size P_2,16
+ .align 16
+SC_4:
+ .long 2773927732
+ .long 1053236707
+ .long 436314138
+ .long 1056571808
+ .type SC_4,@object
+ .size SC_4,16
+ .align 16
+Ctable:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 1072693248
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 1072693248
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 1071644672
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 1071644672
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 1070596096
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 1070596096
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 1069547520
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 1072683149
+ .long 1073741824
+ .long 3163061750
+ .long 0
+ .long 3217031168
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 1072652951
+ .long 536870912
+ .long 1014325783
+ .long 0
+ .long 3218079744
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 1072602945
+ .long 3758096384
+ .long 1015505073
+ .long 0
+ .long 3218079744
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 1072533611
+ .long 536870912
+ .long 1014257638
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 1072445618
+ .long 2147483648
+ .long 3161907377
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 1072339814
+ .long 3758096384
+ .long 1010431536
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 1072217216
+ .long 536870912
+ .long 3162686945
+ .long 0
+ .long 3219128320
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 1072079006
+ .long 536870912
+ .long 3163282740
+ .long 0
+ .long 3219128320
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 1071926515
+ .long 536870912
+ .long 1013450602
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 1071761211
+ .long 536870912
+ .long 1015752157
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 1071524701
+ .long 536870912
+ .long 1012796809
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 1071152610
+ .long 3758096384
+ .long 3160878317
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 1070765062
+ .long 2684354560
+ .long 3161838221
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 1070135480
+ .long 3221225472
+ .long 3160567065
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 1069094822
+ .long 3758096384
+ .long 3158189848
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 393047345
+ .long 1064548654
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 3220176896
+ .long 18115067
+ .long 1066642694
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 3220176896
+ .long 2476548698
+ .long 1067846634
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 3220176896
+ .long 2255197647
+ .long 1068727457
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 3220176896
+ .long 1945768569
+ .long 1069431400
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 3220176896
+ .long 1539668340
+ .long 1069912679
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 3220176896
+ .long 1403757309
+ .long 1070403070
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 3220176896
+ .long 2583490354
+ .long 3217719929
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 3219128320
+ .long 2485417816
+ .long 3217109964
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 3219128320
+ .long 2598800519
+ .long 3215750067
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 3219128320
+ .long 2140183630
+ .long 1067272748
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 3219128320
+ .long 1699043957
+ .long 1069418613
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 3219128320
+ .long 1991047213
+ .long 3215237169
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 3218079744
+ .long 240740309
+ .long 1068244255
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 3218079744
+ .long 257503056
+ .long 1067164005
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 3217031168
+ .long 0
+ .long 0
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 257503056
+ .long 3214647653
+ .long 2748392742
+ .long 3220166797
+ .long 1073741824
+ .long 1015578102
+ .long 0
+ .long 1069547520
+ .long 240740309
+ .long 3215727903
+ .long 3489094832
+ .long 3220136599
+ .long 536870912
+ .long 3161809431
+ .long 0
+ .long 1070596096
+ .long 1991047213
+ .long 1067753521
+ .long 1455828442
+ .long 3220086593
+ .long 3758096384
+ .long 3162988721
+ .long 0
+ .long 1070596096
+ .long 1699043957
+ .long 3216902261
+ .long 3476196678
+ .long 3220017259
+ .long 536870912
+ .long 3161741286
+ .long 0
+ .long 1071644672
+ .long 2140183630
+ .long 3214756396
+ .long 4051746225
+ .long 3219929266
+ .long 2147483648
+ .long 1014423729
+ .long 0
+ .long 1071644672
+ .long 2598800519
+ .long 1068266419
+ .long 688824739
+ .long 3219823462
+ .long 3758096384
+ .long 3157915184
+ .long 0
+ .long 1071644672
+ .long 2485417816
+ .long 1069626316
+ .long 1796544321
+ .long 3219700864
+ .long 536870912
+ .long 1015203297
+ .long 0
+ .long 1071644672
+ .long 2583490354
+ .long 1070236281
+ .long 1719614413
+ .long 3219562654
+ .long 536870912
+ .long 1015799092
+ .long 0
+ .long 1071644672
+ .long 1403757309
+ .long 3217886718
+ .long 621354454
+ .long 3219410163
+ .long 536870912
+ .long 3160934250
+ .long 0
+ .long 1072693248
+ .long 1539668340
+ .long 3217396327
+ .long 967731400
+ .long 3219244859
+ .long 536870912
+ .long 3163235805
+ .long 0
+ .long 1072693248
+ .long 1945768569
+ .long 3216915048
+ .long 939980347
+ .long 3219008349
+ .long 536870912
+ .long 3160280457
+ .long 0
+ .long 1072693248
+ .long 2255197647
+ .long 3216211105
+ .long 2796464483
+ .long 3218636258
+ .long 3758096384
+ .long 1013394669
+ .long 0
+ .long 1072693248
+ .long 2476548698
+ .long 3215330282
+ .long 785751814
+ .long 3218248710
+ .long 2684354560
+ .long 1014354573
+ .long 0
+ .long 1072693248
+ .long 18115067
+ .long 3214126342
+ .long 1013556747
+ .long 3217619128
+ .long 3221225472
+ .long 1013083417
+ .long 0
+ .long 1072693248
+ .long 393047345
+ .long 3212032302
+ .long 3156849708
+ .long 3216578470
+ .long 3758096384
+ .long 1010706200
+ .long 0
+ .long 1072693248
+ .type Ctable,@object
+ .size Ctable,2048
+ .align 16
+SC_2:
+ .long 286331153
+ .long 1065423121
+ .long 1431655765
+ .long 1067799893
+ .type SC_2,@object
+ .size SC_2,16
+ .align 16
+SC_3:
+ .long 436314138
+ .long 3207201184
+ .long 381774871
+ .long 3210133868
+ .type SC_3,@object
+ .size SC_3,16
+ .align 16
+SC_1:
+ .long 1431655765
+ .long 3217380693
+ .long 0
+ .long 3219128320
+ .type SC_1,@object
+ .size SC_1,16
+ .align 16
+PI_INV_TABLE:
+ .long 0
+ .long 0
+ .long 2734261102
+ .long 1313084713
+ .long 4230436817
+ .long 4113882560
+ .long 3680671129
+ .long 1011060801
+ .long 4266746795
+ .long 3736847713
+ .long 3072618042
+ .long 1112396512
+ .long 105459434
+ .long 164729372
+ .long 4263373596
+ .long 2972297022
+ .long 3900847605
+ .long 784024708
+ .long 3919343654
+ .long 3026157121
+ .long 965858873
+ .long 2203269620
+ .long 2625920907
+ .long 3187222587
+ .long 536385535
+ .long 3724908559
+ .long 4012839307
+ .long 1510632735
+ .long 1832287951
+ .long 667617719
+ .long 1330003814
+ .long 2657085997
+ .long 1965537991
+ .long 3957715323
+ .long 1023883767
+ .long 2320667370
+ .long 1811636145
+ .long 529358088
+ .long 1443049542
+ .long 4235946923
+ .long 4040145953
+ .type PI_INV_TABLE,@object
+ .size PI_INV_TABLE,164
+ .space 12, 0x00 # pad
+ .align 16
+PI_4:
+ .long 1073741824
+ .long 1072243195
+ .long 407279769
+ .long 1046758445
+ .type PI_4,@object
+ .size PI_4,16
+ .align 8
+PI32INV:
+ .long 1841940611
+ .long 1076125488
+ .type PI32INV,@object
+ .size PI32INV,8
+ .align 8
+SHIFTER:
+ .long 0
+ .long 1127743488
+ .type SHIFTER,@object
+ .size SHIFTER,8
+ .align 8
+SIGN_MASK:
+ .long 0
+ .long 2147483648
+ .type SIGN_MASK,@object
+ .size SIGN_MASK,8
+ .align 8
+P_3:
+ .long 771977331
+ .long 996350346
+ .type P_3,@object
+ .size P_3,8
+ .align 8
+ALL_ONES:
+ .long 4294967295
+ .long 1072693247
+ .type ALL_ONES,@object
+ .size ALL_ONES,8
+ .align 8
+TWO_POW_55:
+ .long 0
+ .long 1130364928
+ .type TWO_POW_55,@object
+ .size TWO_POW_55,8
+ .align 8
+TWO_POW_M55:
+ .long 0
+ .long 1015021568
+ .type TWO_POW_M55,@object
+ .size TWO_POW_M55,8
+ .align 8
+P_1:
+ .long 1413480448
+ .long 1069097467
+ .type P_1,@object
+ .size P_1,8
+ .align 8
+NEG_ZERO:
+ .long 0
+ .long 2147483648
+ .type NEG_ZERO,@object
+ .size NEG_ZERO,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000002c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_sin.1-.
+ .4byte ..___tag_value_sin.9-..___tag_value_sin.1
+ .2byte 0x0400
+ .4byte ..___tag_value_sin.3-..___tag_value_sin.1
+ .4byte 0x0283100e
+ .byte 0x04
+ .4byte ..___tag_value_sin.5-..___tag_value_sin.3
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_sin.6-..___tag_value_sin.5
+ .4byte 0x04c3100e
+ .4byte ..___tag_value_sin.8-..___tag_value_sin.6
+ .2byte 0x080e
+# End
diff --git a/libm/x86_64/s_tan.S b/libm/x86_64/s_tan.S
new file mode 100644
index 0000000..74cb044
--- /dev/null
+++ b/libm/x86_64/s_tan.S
@@ -0,0 +1,2239 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// Polynomials coefficients and other constants.
+//
+// Note that in this algorithm, there is a different polynomial for
+// each breakpoint, so there are 32 sets of polynomial coefficients
+// as well as 32 instances of the other constants.
+//
+// The polynomial coefficients and constants are offset from the start
+// of the main block as follows:
+//
+// 0: c8 | c0
+// 16: c9 | c1
+// 32: c10 | c2
+// 48: c11 | c3
+// 64: c12 | c4
+// 80: c13 | c5
+// 96: c14 | c6
+// 112: c15 | c7
+// 128: T_hi
+// 136: T_lo
+// 144: Sigma
+// 152: T_hl
+// 160: Tau
+// 168: Mask
+// 176: (end of block)
+//
+// The total table size is therefore 5632 bytes.
+//
+// Note that c0 and c1 are always zero. We could try storing
+// other constants here, and just loading the low part of the
+// SIMD register in these cases, after ensuring the high part
+// is zero.
+//
+// The higher terms of the polynomial are computed in the *low*
+// part of the SIMD register. This is so we can overlap the
+// multiplication by r^8 and the unpacking of the other part.
+//
+// The constants are:
+// T_hi + T_lo = accurate constant term in power series
+// Sigma + T_hl = accurate coefficient of r in power series (Sigma=1 bit)
+// Tau = multiplier for the reciprocal, always -1 or 0
+//
+// The basic reconstruction formula using these constants is:
+//
+// High = tau * recip_hi + t_hi
+// Med = (sgn * r + t_hl * r)_hi
+// Low = (sgn * r + t_hl * r)_lo +
+// tau * recip_lo + T_lo + (T_hl + sigma) * c + pol
+//
+// where pol = c0 + c1 * r + c2 * r^2 + ... + c15 * r^15
+//
+// (c0 = c1 = 0, but using them keeps SIMD regularity)
+//
+// We then do a compensated sum High + Med, add the low parts together
+// and then do the final sum.
+//
+// Here recip_hi + recip_lo is an accurate reciprocal of the remainder
+// modulo pi/2
+//
+// Special cases:
+// tan(NaN) = quiet NaN, and raise invalid exception
+// tan(INF) = NaN and raise invalid exception
+// tan(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin tan
+ENTRY(tan)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_tan.1:
+ pushq %rbx
+..___tag_value_tan.3:
+ subq $16, %rsp
+..___tag_value_tan.5:
+ movsd %xmm0, 8(%rsp)
+..B1.2:
+ pextrw $3, %xmm0, %eax
+ andl $32767, %eax
+ subl $16314, %eax
+ cmpl $270, %eax
+ ja .L_2TAG_PACKET_0.0.1
+ movapd ONEHALF(%rip), %xmm5
+ movapd MUL16(%rip), %xmm6
+ unpcklpd %xmm0, %xmm0
+ movapd sign_mask(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ movapd PI32INV(%rip), %xmm1
+ mulpd %xmm0, %xmm1
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ movapd %xmm1, %xmm7
+ unpckhpd %xmm7, %xmm7
+ cvttsd2si %xmm7, %edx
+ cvttpd2dq %xmm1, %xmm1
+ cvtdq2pd %xmm1, %xmm1
+ mulpd %xmm6, %xmm1
+ movapd P_1(%rip), %xmm3
+ movq QQ_2(%rip), %xmm5
+ addq $469248, %rdx
+ movapd P_2(%rip), %xmm4
+ mulpd %xmm1, %xmm3
+ andq $31, %rdx
+ mulsd %xmm1, %xmm5
+ movq %rdx, %rcx
+ mulpd %xmm1, %xmm4
+ shlq $1, %rcx
+ subpd %xmm3, %xmm0
+ mulpd P_3(%rip), %xmm1
+ addq %rcx, %rdx
+ shlq $2, %rcx
+ addq %rcx, %rdx
+ addsd %xmm0, %xmm5
+ movapd %xmm0, %xmm2
+ subpd %xmm4, %xmm0
+ movq ONE(%rip), %xmm6
+ shlq $4, %rdx
+ lea Ctable(%rip), %rax
+ andpd MASK_35(%rip), %xmm5
+ movapd %xmm0, %xmm3
+ addq %rdx, %rax
+ subpd %xmm0, %xmm2
+ unpckhpd %xmm0, %xmm0
+ divsd %xmm5, %xmm6
+ subpd %xmm4, %xmm2
+ movapd 16(%rax), %xmm7
+ subsd %xmm5, %xmm3
+ mulpd %xmm0, %xmm7
+ subpd %xmm1, %xmm2
+ movapd 48(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ movapd 96(%rax), %xmm4
+ mulpd %xmm0, %xmm4
+ addsd %xmm3, %xmm2
+ movapd %xmm0, %xmm3
+ mulpd %xmm0, %xmm0
+ addpd (%rax), %xmm7
+ addpd 32(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd 80(%rax), %xmm4
+ addpd %xmm1, %xmm7
+ movapd 112(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm0
+ addpd %xmm1, %xmm4
+ movapd 64(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd %xmm1, %xmm7
+ movapd %xmm3, %xmm1
+ mulpd %xmm0, %xmm3
+ mulsd %xmm0, %xmm0
+ mulpd 144(%rax), %xmm1
+ mulpd %xmm3, %xmm4
+ movq %xmm1, %xmm3
+ addpd %xmm4, %xmm7
+ movq %xmm1, %xmm4
+ mulsd %xmm7, %xmm0
+ unpckhpd %xmm7, %xmm7
+ addsd %xmm7, %xmm0
+ unpckhpd %xmm1, %xmm1
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ movq %xmm2, %xmm4
+ movq 144(%rax), %xmm7
+ unpckhpd %xmm2, %xmm2
+ addsd 152(%rax), %xmm7
+ mulsd %xmm2, %xmm7
+ addsd 136(%rax), %xmm7
+ addsd %xmm1, %xmm7
+ addsd %xmm7, %xmm0
+ movq ONE(%rip), %xmm7
+ mulsd %xmm6, %xmm4
+ movq 168(%rax), %xmm2
+ andpd %xmm6, %xmm2
+ mulsd %xmm2, %xmm5
+ mulsd 160(%rax), %xmm6
+ subsd %xmm5, %xmm7
+ subsd 128(%rax), %xmm2
+ subsd %xmm4, %xmm7
+ mulsd %xmm6, %xmm7
+ movq %xmm3, %xmm4
+ subsd %xmm2, %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm4
+ addsd %xmm4, %xmm0
+ subsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_0.0.1:
+ jg .L_2TAG_PACKET_1.0.1
+ pextrw $3, %xmm0, %eax
+ movl %eax, %edx
+ andl $32752, %eax
+ je .L_2TAG_PACKET_2.0.1
+ andl $32767, %edx
+ cmpl $15904, %edx
+ jb .L_2TAG_PACKET_3.0.1
+ movq %xmm0, %xmm2
+ movq %xmm0, %xmm3
+ movq Q_11(%rip), %xmm1
+ mulsd %xmm0, %xmm2
+ mulsd %xmm2, %xmm3
+ mulsd %xmm2, %xmm1
+ addsd Q_9(%rip), %xmm1
+ mulsd %xmm2, %xmm1
+ addsd Q_7(%rip), %xmm1
+ mulsd %xmm2, %xmm1
+ addsd Q_5(%rip), %xmm1
+ mulsd %xmm2, %xmm1
+ addsd Q_3(%rip), %xmm1
+ mulsd %xmm3, %xmm1
+ addsd %xmm1, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_3.0.1:
+ movq TWO_POW_55(%rip), %xmm3
+ mulsd %xmm0, %xmm3
+ addsd %xmm3, %xmm0
+ mulsd TWO_POW_M55(%rip), %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_2.0.1:
+ movq %xmm0, %xmm1
+ mulsd %xmm1, %xmm1
+ jmp ..B1.4
+.L_2TAG_PACKET_1.0.1:
+ pextrw $3, %xmm0, %eax
+ andl $32752, %eax
+ cmpl $32752, %eax
+ je .L_2TAG_PACKET_4.0.1
+ pextrw $3, %xmm0, %ecx
+ andl $32752, %ecx
+ subl $16224, %ecx
+ shrl $7, %ecx
+ andl $65532, %ecx
+ lea PI_INV_TABLE(%rip), %r11
+ addq %r11, %rcx
+ movd %xmm0, %rax
+ movl 20(%rcx), %r10d
+ movl 24(%rcx), %r8d
+ movl %eax, %edx
+ shrq $21, %rax
+ orl $-2147483648, %eax
+ shrl $11, %eax
+ movl %r10d, %r9d
+ imulq %rdx, %r10
+ imulq %rax, %r9
+ imulq %rax, %r8
+ movl 16(%rcx), %esi
+ movl 12(%rcx), %edi
+ movl %r10d, %r11d
+ shrq $32, %r10
+ addq %r10, %r9
+ addq %r8, %r11
+ movl %r11d, %r8d
+ shrq $32, %r11
+ addq %r11, %r9
+ movl %esi, %r10d
+ imulq %rdx, %rsi
+ imulq %rax, %r10
+ movl %edi, %r11d
+ imulq %rdx, %rdi
+ movl %esi, %ebx
+ shrq $32, %rsi
+ addq %rbx, %r9
+ movl %r9d, %ebx
+ shrq $32, %r9
+ addq %rsi, %r10
+ addq %r9, %r10
+ shlq $32, %rbx
+ orq %rbx, %r8
+ imulq %rax, %r11
+ movl 8(%rcx), %r9d
+ movl 4(%rcx), %esi
+ movl %edi, %ebx
+ shrq $32, %rdi
+ addq %rbx, %r10
+ movl %r10d, %ebx
+ shrq $32, %r10
+ addq %rdi, %r11
+ addq %r10, %r11
+ movq %r9, %rdi
+ imulq %rdx, %r9
+ imulq %rax, %rdi
+ movl %r9d, %r10d
+ shrq $32, %r9
+ addq %r10, %r11
+ movl %r11d, %r10d
+ shrq $32, %r11
+ addq %r9, %rdi
+ addq %r11, %rdi
+ movq %rsi, %r9
+ imulq %rdx, %rsi
+ imulq %rax, %r9
+ shlq $32, %r10
+ orq %rbx, %r10
+ movl (%rcx), %eax
+ movl %esi, %r11d
+ shrq $32, %rsi
+ addq %r11, %rdi
+ movl %edi, %r11d
+ shrq $32, %rdi
+ addq %rsi, %r9
+ addq %rdi, %r9
+ imulq %rax, %rdx
+ pextrw $3, %xmm0, %ebx
+ lea PI_INV_TABLE(%rip), %rdi
+ subq %rdi, %rcx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl %ecx, %ecx
+ addl $19, %ecx
+ movl $32768, %esi
+ andl %ebx, %esi
+ shrl $4, %ebx
+ andl $2047, %ebx
+ subl $1023, %ebx
+ subl %ebx, %ecx
+ addq %rdx, %r9
+ movl %ecx, %edx
+ addl $32, %edx
+ cmpl $0, %ecx
+ jl .L_2TAG_PACKET_5.0.1
+ negl %ecx
+ addl $29, %ecx
+ shll %cl, %r9d
+ movl %r9d, %edi
+ andl $1073741823, %r9d
+ testl $536870912, %r9d
+ jne .L_2TAG_PACKET_6.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+.L_2TAG_PACKET_7.0.1:
+.L_2TAG_PACKET_8.0.1:
+ cmpq $0, %r9
+ je .L_2TAG_PACKET_9.0.1
+.L_2TAG_PACKET_10.0.1:
+ bsr %r9, %r11
+ movl $29, %ecx
+ subl %r11d, %ecx
+ jle .L_2TAG_PACKET_11.0.1
+ shlq %cl, %r9
+ movq %r10, %rax
+ shlq %cl, %r10
+ addl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shrq %cl, %rax
+ shrq %cl, %r8
+ orq %rax, %r9
+ orq %r8, %r10
+.L_2TAG_PACKET_12.0.1:
+ cvtsi2sdq %r9, %xmm0
+ shrq $1, %r10
+ cvtsi2sdq %r10, %xmm3
+ xorpd %xmm4, %xmm4
+ shll $4, %edx
+ negl %edx
+ addl $16368, %edx
+ orl %esi, %edx
+ xorl %ebx, %edx
+ pinsrw $3, %edx, %xmm4
+ movq PI_4(%rip), %xmm2
+ movq 8+PI_4(%rip), %xmm7
+ xorpd %xmm5, %xmm5
+ subl $1008, %edx
+ pinsrw $3, %edx, %xmm5
+ mulsd %xmm4, %xmm0
+ shll $16, %esi
+ sarl $31, %esi
+ mulsd %xmm5, %xmm3
+ movq %xmm0, %xmm1
+ mulsd %xmm2, %xmm0
+ shrl $30, %edi
+ addsd %xmm3, %xmm1
+ mulsd %xmm2, %xmm3
+ addl %esi, %edi
+ xorl %esi, %edi
+ mulsd %xmm1, %xmm7
+ movl %edi, %eax
+ addsd %xmm3, %xmm7
+ movq %xmm0, %xmm2
+ addsd %xmm7, %xmm0
+ subsd %xmm0, %xmm2
+ addsd %xmm2, %xmm7
+ movapd PI32INV(%rip), %xmm1
+ movddup %xmm0, %xmm0
+ movapd sign_mask(%rip), %xmm4
+ andpd %xmm0, %xmm4
+ mulpd %xmm0, %xmm1
+ movddup %xmm7, %xmm7
+ movapd ONEHALF(%rip), %xmm5
+ movapd MUL16(%rip), %xmm6
+ orps %xmm4, %xmm5
+ addpd %xmm5, %xmm1
+ movapd %xmm1, %xmm5
+ unpckhpd %xmm5, %xmm5
+ cvttsd2si %xmm5, %edx
+ cvttpd2dq %xmm1, %xmm1
+ cvtdq2pd %xmm1, %xmm1
+ mulpd %xmm6, %xmm1
+ movapd P_1(%rip), %xmm3
+ movq QQ_2(%rip), %xmm5
+ shll $4, %eax
+ addl $469248, %edx
+ movapd P_2(%rip), %xmm4
+ mulpd %xmm1, %xmm3
+ addl %eax, %edx
+ andl $31, %edx
+ mulsd %xmm1, %xmm5
+ movl %edx, %ecx
+ mulpd %xmm1, %xmm4
+ shll $1, %ecx
+ subpd %xmm3, %xmm0
+ mulpd P_3(%rip), %xmm1
+ addl %ecx, %edx
+ shll $2, %ecx
+ addl %ecx, %edx
+ addsd %xmm0, %xmm5
+ movapd %xmm0, %xmm2
+ subpd %xmm4, %xmm0
+ movq ONE(%rip), %xmm6
+ shll $4, %edx
+ lea Ctable(%rip), %rax
+ andpd MASK_35(%rip), %xmm5
+ movapd %xmm0, %xmm3
+ addq %rdx, %rax
+ subpd %xmm0, %xmm2
+ unpckhpd %xmm0, %xmm0
+ divsd %xmm5, %xmm6
+ subpd %xmm4, %xmm2
+ subsd %xmm5, %xmm3
+ subpd %xmm1, %xmm2
+ movapd 48(%rax), %xmm1
+ addpd %xmm7, %xmm2
+ movapd 16(%rax), %xmm7
+ mulpd %xmm0, %xmm7
+ movapd 96(%rax), %xmm4
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm4
+ addsd %xmm3, %xmm2
+ movapd %xmm0, %xmm3
+ mulpd %xmm0, %xmm0
+ addpd (%rax), %xmm7
+ addpd 32(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd 80(%rax), %xmm4
+ addpd %xmm1, %xmm7
+ movapd 112(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ mulpd %xmm0, %xmm0
+ addpd %xmm1, %xmm4
+ movapd 64(%rax), %xmm1
+ mulpd %xmm0, %xmm1
+ addpd %xmm1, %xmm7
+ movapd %xmm3, %xmm1
+ mulpd %xmm0, %xmm3
+ mulsd %xmm0, %xmm0
+ mulpd 144(%rax), %xmm1
+ mulpd %xmm3, %xmm4
+ movq %xmm1, %xmm3
+ addpd %xmm4, %xmm7
+ movq %xmm1, %xmm4
+ mulsd %xmm7, %xmm0
+ unpckhpd %xmm7, %xmm7
+ addsd %xmm7, %xmm0
+ unpckhpd %xmm1, %xmm1
+ addsd %xmm1, %xmm3
+ subsd %xmm3, %xmm4
+ addsd %xmm4, %xmm1
+ movq %xmm2, %xmm4
+ movq 144(%rax), %xmm7
+ unpckhpd %xmm2, %xmm2
+ addsd 152(%rax), %xmm7
+ mulsd %xmm2, %xmm7
+ addsd 136(%rax), %xmm7
+ addsd %xmm1, %xmm7
+ addsd %xmm7, %xmm0
+ movq ONE(%rip), %xmm7
+ mulsd %xmm6, %xmm4
+ movq 168(%rax), %xmm2
+ andpd %xmm6, %xmm2
+ mulsd %xmm2, %xmm5
+ mulsd 160(%rax), %xmm6
+ subsd %xmm5, %xmm7
+ subsd 128(%rax), %xmm2
+ subsd %xmm4, %xmm7
+ mulsd %xmm6, %xmm7
+ movq %xmm3, %xmm4
+ subsd %xmm2, %xmm3
+ addsd %xmm3, %xmm2
+ subsd %xmm2, %xmm4
+ addsd %xmm4, %xmm0
+ subsd %xmm7, %xmm0
+ addsd %xmm3, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_9.0.1:
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ movq $0, %r8
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_10.0.1
+ addl $64, %edx
+ movq %r10, %r9
+ movq %r8, %r10
+ cmpq $0, %r9
+ jne .L_2TAG_PACKET_10.0.1
+ jmp .L_2TAG_PACKET_12.0.1
+.L_2TAG_PACKET_11.0.1:
+ je .L_2TAG_PACKET_12.0.1
+ negl %ecx
+ shrq %cl, %r10
+ movq %r9, %rax
+ shrq %cl, %r9
+ subl %ecx, %edx
+ negl %ecx
+ addl $64, %ecx
+ shlq %cl, %rax
+ orq %rax, %r10
+ jmp .L_2TAG_PACKET_12.0.1
+.L_2TAG_PACKET_5.0.1:
+ notl %ecx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq %cl, %r9
+ movq %r9, %rdi
+ testl $-2147483648, %r9d
+ jne .L_2TAG_PACKET_13.0.1
+ shrl %cl, %r9d
+ movl $0, %ebx
+ shrq $2, %rdi
+ jmp .L_2TAG_PACKET_8.0.1
+.L_2TAG_PACKET_6.0.1:
+ shrl %cl, %r9d
+ movl $1073741824, %ebx
+ shrl %cl, %ebx
+ shlq $32, %r9
+ orq %r11, %r9
+ shlq $32, %rbx
+ addl $1073741824, %edi
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ jmp .L_2TAG_PACKET_7.0.1
+.L_2TAG_PACKET_13.0.1:
+ shrl %cl, %r9d
+ movq $0x100000000, %rbx
+ shrq %cl, %rbx
+ movq $0, %rcx
+ movq $0, %r11
+ subq %r8, %rcx
+ sbbq %r10, %r11
+ sbbq %r9, %rbx
+ movq %rcx, %r8
+ movq %r11, %r10
+ movq %rbx, %r9
+ movl $32768, %ebx
+ shrq $2, %rdi
+ addl $1073741824, %edi
+ jmp .L_2TAG_PACKET_8.0.1
+.L_2TAG_PACKET_4.0.1:
+ movq 8(%rsp), %xmm0
+ mulsd NEG_ZERO(%rip), %xmm0
+ movq %xmm0, (%rsp)
+.L_2TAG_PACKET_14.0.1:
+..B1.4:
+ addq $16, %rsp
+..___tag_value_tan.6:
+ popq %rbx
+..___tag_value_tan.8:
+ ret
+..___tag_value_tan.9:
+END(tan)
+# -- End tan
+ .section .rodata, "a"
+ .align 16
+ .align 16
+ONEHALF:
+ .long 0
+ .long 1071644672
+ .long 0
+ .long 1071644672
+ .type ONEHALF,@object
+ .size ONEHALF,16
+ .align 16
+MUL16:
+ .long 0
+ .long 1076887552
+ .long 0
+ .long 1072693248
+ .type MUL16,@object
+ .size MUL16,16
+ .align 16
+sign_mask:
+ .long 0
+ .long 2147483648
+ .long 0
+ .long 2147483648
+ .type sign_mask,@object
+ .size sign_mask,16
+ .align 16
+PI32INV:
+ .long 1841940611
+ .long 1071931184
+ .long 1841940611
+ .long 1076125488
+ .type PI32INV,@object
+ .size PI32INV,16
+ .align 16
+P_1:
+ .long 1413758976
+ .long 1069097467
+ .long 1413742592
+ .long 1069097467
+ .type P_1,@object
+ .size P_1,16
+ .align 16
+P_2:
+ .long 1734819840
+ .long 3174229945
+ .long 1280049152
+ .long 1028033571
+ .type P_2,@object
+ .size P_2,16
+ .align 16
+P_3:
+ .long 923219018
+ .long 984130272
+ .long 57701189
+ .long 988383790
+ .type P_3,@object
+ .size P_3,16
+ .align 16
+Ctable:
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1066820852
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1441186365
+ .long 1065494243
+ .long 1431655765
+ .long 1070945621
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 236289504
+ .long 1064135997
+ .long 286331153
+ .long 1069617425
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1160476131
+ .long 1062722102
+ .long 463583772
+ .long 1068212666
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1313038235
+ .long 1066745731
+ .long 0
+ .long 0
+ .long 1013878342
+ .long 1067152618
+ .long 0
+ .long 0
+ .long 3663426833
+ .long 1065725283
+ .long 3693284251
+ .long 1069118808
+ .long 650852232
+ .long 1065882376
+ .long 1996245381
+ .long 1071000265
+ .long 2008746170
+ .long 1064664197
+ .long 3055842593
+ .long 1068578846
+ .long 1495406348
+ .long 1064652437
+ .long 2269530157
+ .long 1069711235
+ .long 285563696
+ .long 1063576465
+ .long 1046897440
+ .long 1067705865
+ .long 233429731
+ .long 1063453151
+ .long 522045958
+ .long 1068476590
+ .long 2354785698
+ .long 1069102779
+ .long 1317599141
+ .long 1012432133
+ .long 0
+ .long 1072693248
+ .long 2828230105
+ .long 1065606626
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1512545955
+ .long 1068119047
+ .long 0
+ .long 0
+ .long 1127048698
+ .long 1067909459
+ .long 0
+ .long 0
+ .long 2300200450
+ .long 1067254767
+ .long 3593250296
+ .long 1070233561
+ .long 3009365544
+ .long 1066902117
+ .long 1127373050
+ .long 1071173457
+ .long 3046103305
+ .long 1066371299
+ .long 24583402
+ .long 1069723988
+ .long 4082511758
+ .long 1065914199
+ .long 3223889699
+ .long 1070020367
+ .long 548927984
+ .long 1065415756
+ .long 558065897
+ .long 1068949418
+ .long 680073315
+ .long 1064940726
+ .long 388873200
+ .long 1068944270
+ .long 3763679576
+ .long 1070167541
+ .long 1497360404
+ .long 1009710547
+ .long 0
+ .long 1072693248
+ .long 64931152
+ .long 1067729411
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2467582782
+ .long 1069256389
+ .long 0
+ .long 0
+ .long 162150096
+ .long 1068946420
+ .long 0
+ .long 0
+ .long 3702794237
+ .long 1068579152
+ .long 3631919291
+ .long 1070936926
+ .long 3456821413
+ .long 1068217218
+ .long 2031366438
+ .long 1071495745
+ .long 1596664020
+ .long 1067799281
+ .long 1509038701
+ .long 1070601643
+ .long 583171477
+ .long 1067510148
+ .long 3785344682
+ .long 1070618476
+ .long 2402036048
+ .long 1067075736
+ .long 3233018412
+ .long 1069913186
+ .long 411280568
+ .long 1066710556
+ .long 1065584192
+ .long 1069747896
+ .long 895247324
+ .long 1070819848
+ .long 500078909
+ .long 3161288781
+ .long 0
+ .long 1072693248
+ .long 729983843
+ .long 1068994194
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1458794562
+ .long 1070398550
+ .long 0
+ .long 0
+ .long 2857777489
+ .long 1070137637
+ .long 0
+ .long 0
+ .long 1024359517
+ .long 1069876531
+ .long 2616040238
+ .long 1071582937
+ .long 1609024636
+ .long 1069675088
+ .long 2529240549
+ .long 1071836633
+ .long 1510128600
+ .long 1069440113
+ .long 2251697184
+ .long 1071253687
+ .long 1262761453
+ .long 1069142850
+ .long 1263091857
+ .long 1071190461
+ .long 3043383486
+ .long 1068885191
+ .long 2476932470
+ .long 1070842002
+ .long 3659995028
+ .long 1068669200
+ .long 855891755
+ .long 1070696894
+ .long 2583490354
+ .long 1071284857
+ .long 3062633575
+ .long 1014008623
+ .long 0
+ .long 1072693248
+ .long 2550940471
+ .long 1069938201
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3422807297
+ .long 1071640847
+ .long 0
+ .long 0
+ .long 1151658053
+ .long 1071494715
+ .long 0
+ .long 0
+ .long 929607071
+ .long 1071346340
+ .long 1037049034
+ .long 1072037305
+ .long 2786928657
+ .long 1071215282
+ .long 1447406859
+ .long 1072265209
+ .long 3490952107
+ .long 1071090851
+ .long 3205232916
+ .long 1071968658
+ .long 1297344304
+ .long 1070977120
+ .long 1066110976
+ .long 1071946035
+ .long 3803721480
+ .long 1070871082
+ .long 1496754229
+ .long 1071807201
+ .long 2982550683
+ .long 1070773243
+ .long 4014441989
+ .long 1071736222
+ .long 419968236
+ .long 1071717047
+ .long 3451266538
+ .long 3163444811
+ .long 0
+ .long 1072693248
+ .long 2960267235
+ .long 1070745841
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 724322768
+ .long 1072881308
+ .long 0
+ .long 0
+ .long 643153048
+ .long 1072905816
+ .long 0
+ .long 0
+ .long 4285079458
+ .long 1072928558
+ .long 3912524733
+ .long 1072622983
+ .long 118362272
+ .long 1072952754
+ .long 4107767972
+ .long 1072827408
+ .long 2689502883
+ .long 1072976922
+ .long 946523347
+ .long 1072772766
+ .long 573204189
+ .long 1073001761
+ .long 581531518
+ .long 1072826391
+ .long 1386236526
+ .long 1073026959
+ .long 3718905905
+ .long 1072832823
+ .long 1145558140
+ .long 1073052673
+ .long 513572637
+ .long 1072861969
+ .long 716700048
+ .long 1071997368
+ .long 547126769
+ .long 1015523525
+ .long 0
+ .long 1072693248
+ .long 1097907398
+ .long 1071420120
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3349892442
+ .long 1074290212
+ .long 0
+ .long 0
+ .long 3913197405
+ .long 1074501181
+ .long 0
+ .long 0
+ .long 2494034522
+ .long 1074739170
+ .long 1264738763
+ .long 1073084804
+ .long 1520293906
+ .long 1074899632
+ .long 1958936600
+ .long 1073411493
+ .long 2133649635
+ .long 1075052171
+ .long 4270740730
+ .long 1073574708
+ .long 1728930189
+ .long 1075224844
+ .long 1303998552
+ .long 1073799186
+ .long 618611933
+ .long 1075420255
+ .long 1769828046
+ .long 1073938542
+ .long 2200537986
+ .long 1075641421
+ .long 433361110
+ .long 1074105369
+ .long 719595600
+ .long 1072317184
+ .long 294527206
+ .long 3162140088
+ .long 0
+ .long 1073741824
+ .long 3811788216
+ .long 3218400550
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1704352102
+ .long 1075943001
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1076258036
+ .long 0
+ .long 0
+ .long 2211264291
+ .long 1076659010
+ .long 0
+ .long 1073741824
+ .long 1441186365
+ .long 1077028579
+ .long 1431655765
+ .long 1074091349
+ .long 876943673
+ .long 1077353622
+ .long 2863311531
+ .long 1074440874
+ .long 236289504
+ .long 1077767485
+ .long 286331153
+ .long 1074860305
+ .long 2805473311
+ .long 1078115278
+ .long 95443718
+ .long 1075163227
+ .long 1160476131
+ .long 1078450742
+ .long 463583772
+ .long 1075552698
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 0
+ .long 1073741824
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1330165971
+ .long 3207850745
+ .long 0
+ .long 0
+ .long 217536623
+ .long 1059109098
+ .long 0
+ .long 0
+ .long 3492120849
+ .long 3205151475
+ .long 602185705
+ .long 3215678092
+ .long 760422958
+ .long 1056312597
+ .long 555127889
+ .long 1067545266
+ .long 3139784124
+ .long 3202470837
+ .long 3690544014
+ .long 3213150171
+ .long 95707915
+ .long 1053635428
+ .long 4003114407
+ .long 1064581412
+ .long 2034926231
+ .long 3199711161
+ .long 3759536023
+ .long 3210559989
+ .long 3826928214
+ .long 1050893819
+ .long 3837960785
+ .long 1061790379
+ .long 1526325248
+ .long 3217967566
+ .long 2356426521
+ .long 1025423456
+ .long 0
+ .long 0
+ .long 457728975
+ .long 1071088276
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1398462608
+ .long 3207303968
+ .long 0
+ .long 0
+ .long 26205983
+ .long 1058461213
+ .long 0
+ .long 0
+ .long 56226238
+ .long 3204528612
+ .long 2754706541
+ .long 3215359511
+ .long 2187799823
+ .long 1055634437
+ .long 790323742
+ .long 1067402587
+ .long 1372385848
+ .long 3201651479
+ .long 4097292716
+ .long 3212856302
+ .long 3348210357
+ .long 1052830099
+ .long 2442796466
+ .long 1064337602
+ .long 862608142
+ .long 3198830754
+ .long 170296152
+ .long 3210060867
+ .long 3755571428
+ .long 1049933343
+ .long 3614866008
+ .long 1061361670
+ .long 719978496
+ .long 3217669096
+ .long 1998842465
+ .long 3174703977
+ .long 0
+ .long 0
+ .long 3749156607
+ .long 1071048258
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3120498638
+ .long 3206749304
+ .long 0
+ .long 0
+ .long 2773578114
+ .long 1058009312
+ .long 0
+ .long 0
+ .long 2030783676
+ .long 3203817873
+ .long 2223654598
+ .long 3215071936
+ .long 2976134650
+ .long 1054987244
+ .long 706390066
+ .long 1067217386
+ .long 4258437615
+ .long 3200900378
+ .long 1066252975
+ .long 3212391267
+ .long 815777514
+ .long 1051989462
+ .long 3202745457
+ .long 1064010682
+ .long 2493556375
+ .long 3198004753
+ .long 1046243251
+ .long 3209678971
+ .long 2593078846
+ .long 1049017717
+ .long 2763962276
+ .long 1060970161
+ .long 701480960
+ .long 3217377742
+ .long 3205862232
+ .long 3174660915
+ .long 0
+ .long 0
+ .long 2267016812
+ .long 1071015664
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 2107155798
+ .long 3206166872
+ .long 0
+ .long 0
+ .long 2642992129
+ .long 1057424578
+ .long 0
+ .long 0
+ .long 1936992811
+ .long 3203204426
+ .long 1485063559
+ .long 3214682643
+ .long 1432914553
+ .long 1054319398
+ .long 3996381654
+ .long 1067075828
+ .long 2833029256
+ .long 3200223545
+ .long 2866066872
+ .long 3211982662
+ .long 2432888737
+ .long 1051234178
+ .long 3669764559
+ .long 1063748136
+ .long 2458496952
+ .long 3197170774
+ .long 1948234989
+ .long 3209098147
+ .long 2843698787
+ .long 1048163519
+ .long 3398041407
+ .long 1060559728
+ .long 2829230080
+ .long 3217092115
+ .long 1034046433
+ .long 3174271903
+ .long 0
+ .long 0
+ .long 298675305
+ .long 1070989821
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 437603223
+ .long 3205589761
+ .long 0
+ .long 0
+ .long 759330352
+ .long 1057048511
+ .long 0
+ .long 0
+ .long 3107463368
+ .long 3202507988
+ .long 3144465176
+ .long 3214191500
+ .long 2290961810
+ .long 1053841035
+ .long 1618153340
+ .long 1066971547
+ .long 3836869393
+ .long 3199400272
+ .long 584032116
+ .long 3211469261
+ .long 1245704358
+ .long 1050626462
+ .long 4247487438
+ .long 1063561943
+ .long 1669034927
+ .long 3196274812
+ .long 3844233498
+ .long 3208626322
+ .long 2706958524
+ .long 1047411374
+ .long 3857199098
+ .long 1060281647
+ .long 3593904128
+ .long 3216590719
+ .long 3267547836
+ .long 3172163321
+ .long 0
+ .long 0
+ .long 4076712227
+ .long 1070970214
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3290090340
+ .long 3204793485
+ .long 0
+ .long 0
+ .long 3685760367
+ .long 1056668370
+ .long 0
+ .long 0
+ .long 2655163949
+ .long 3201674917
+ .long 628750575
+ .long 3213566872
+ .long 680140505
+ .long 1053299777
+ .long 2954464709
+ .long 1066900026
+ .long 803201619
+ .long 3198516435
+ .long 1466315631
+ .long 3210837162
+ .long 1611220163
+ .long 1049972438
+ .long 2766187256
+ .long 1063437894
+ .long 1804579484
+ .long 3195331491
+ .long 3695969289
+ .long 3207854418
+ .long 2617238373
+ .long 1046675948
+ .long 3095830084
+ .long 1060095334
+ .long 3789570048
+ .long 3216034914
+ .long 23826559
+ .long 3172048060
+ .long 0
+ .long 0
+ .long 3870939386
+ .long 1070956467
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1571758758
+ .long 3203672535
+ .long 0
+ .long 0
+ .long 113026373
+ .long 1056416381
+ .long 0
+ .long 0
+ .long 1913766298
+ .long 3200523326
+ .long 2507068734
+ .long 3212502004
+ .long 4000648818
+ .long 1053003803
+ .long 2446607349
+ .long 1066858259
+ .long 912662124
+ .long 3197333001
+ .long 1349489537
+ .long 3209765608
+ .long 3412972607
+ .long 1049641401
+ .long 1721283327
+ .long 1063366855
+ .long 1466691883
+ .long 3194116746
+ .long 3852528092
+ .long 3206760861
+ .long 285443293
+ .long 1046158380
+ .long 1758739894
+ .long 1059895449
+ .long 1858781184
+ .long 3214984212
+ .long 3447575948
+ .long 1024675855
+ .long 0
+ .long 0
+ .long 2242038011
+ .long 1070948320
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 737611454
+ .long 1056336527
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3594790527
+ .long 1052911621
+ .long 381774871
+ .long 1066844524
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3303051618
+ .long 1049456050
+ .long 3154187623
+ .long 1063343722
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 528061788
+ .long 1045944910
+ .long 2469719819
+ .long 1059831159
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1431655765
+ .long 1070945621
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1571758758
+ .long 1056188887
+ .long 0
+ .long 0
+ .long 113026373
+ .long 1056416381
+ .long 0
+ .long 0
+ .long 1913766298
+ .long 1053039678
+ .long 2507068734
+ .long 1065018356
+ .long 4000648818
+ .long 1053003803
+ .long 2446607349
+ .long 1066858259
+ .long 912662124
+ .long 1049849353
+ .long 1349489537
+ .long 1062281960
+ .long 3412972607
+ .long 1049641401
+ .long 1721283327
+ .long 1063366855
+ .long 1466691883
+ .long 1046633098
+ .long 3852528092
+ .long 1059277213
+ .long 285443293
+ .long 1046158380
+ .long 1758739894
+ .long 1059895449
+ .long 1858781184
+ .long 1067500564
+ .long 3447575948
+ .long 3172159503
+ .long 0
+ .long 0
+ .long 2242038011
+ .long 1070948320
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3290090340
+ .long 1057309837
+ .long 0
+ .long 0
+ .long 3685760367
+ .long 1056668370
+ .long 0
+ .long 0
+ .long 2655163949
+ .long 1054191269
+ .long 628750575
+ .long 1066083224
+ .long 680140505
+ .long 1053299777
+ .long 2954464709
+ .long 1066900026
+ .long 803201619
+ .long 1051032787
+ .long 1466315631
+ .long 1063353514
+ .long 1611220163
+ .long 1049972438
+ .long 2766187256
+ .long 1063437894
+ .long 1804579484
+ .long 1047847843
+ .long 3695969289
+ .long 1060370770
+ .long 2617238373
+ .long 1046675948
+ .long 3095830084
+ .long 1060095334
+ .long 3789570048
+ .long 1068551266
+ .long 23826559
+ .long 1024564412
+ .long 0
+ .long 0
+ .long 3870939386
+ .long 1070956467
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 437603223
+ .long 1058106113
+ .long 0
+ .long 0
+ .long 759330352
+ .long 1057048511
+ .long 0
+ .long 0
+ .long 3107463368
+ .long 1055024340
+ .long 3144465176
+ .long 1066707852
+ .long 2290961810
+ .long 1053841035
+ .long 1618153340
+ .long 1066971547
+ .long 3836869393
+ .long 1051916624
+ .long 584032116
+ .long 1063985613
+ .long 1245704358
+ .long 1050626462
+ .long 4247487438
+ .long 1063561943
+ .long 1669034927
+ .long 1048791164
+ .long 3844233498
+ .long 1061142674
+ .long 2706958524
+ .long 1047411374
+ .long 3857199098
+ .long 1060281647
+ .long 3593904128
+ .long 1069107071
+ .long 3267547836
+ .long 1024679673
+ .long 0
+ .long 0
+ .long 4076712227
+ .long 1070970214
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 2107155798
+ .long 1058683224
+ .long 0
+ .long 0
+ .long 2642992129
+ .long 1057424578
+ .long 0
+ .long 0
+ .long 1936992811
+ .long 1055720778
+ .long 1485063559
+ .long 1067198995
+ .long 1432914553
+ .long 1054319398
+ .long 3996381654
+ .long 1067075828
+ .long 2833029256
+ .long 1052739897
+ .long 2866066872
+ .long 1064499014
+ .long 2432888737
+ .long 1051234178
+ .long 3669764559
+ .long 1063748136
+ .long 2458496952
+ .long 1049687126
+ .long 1948234989
+ .long 1061614499
+ .long 2843698787
+ .long 1048163519
+ .long 3398041407
+ .long 1060559728
+ .long 2829230080
+ .long 1069608467
+ .long 1034046433
+ .long 1026788255
+ .long 0
+ .long 0
+ .long 298675305
+ .long 1070989821
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 3120498638
+ .long 1059265656
+ .long 0
+ .long 0
+ .long 2773578114
+ .long 1058009312
+ .long 0
+ .long 0
+ .long 2030783676
+ .long 1056334225
+ .long 2223654598
+ .long 1067588288
+ .long 2976134650
+ .long 1054987244
+ .long 706390066
+ .long 1067217386
+ .long 4258437615
+ .long 1053416730
+ .long 1066252975
+ .long 1064907619
+ .long 815777514
+ .long 1051989462
+ .long 3202745457
+ .long 1064010682
+ .long 2493556375
+ .long 1050521105
+ .long 1046243251
+ .long 1062195323
+ .long 2593078846
+ .long 1049017717
+ .long 2763962276
+ .long 1060970161
+ .long 701480960
+ .long 1069894094
+ .long 3205862232
+ .long 1027177267
+ .long 0
+ .long 0
+ .long 2267016812
+ .long 1071015664
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1398462608
+ .long 1059820320
+ .long 0
+ .long 0
+ .long 26205983
+ .long 1058461213
+ .long 0
+ .long 0
+ .long 56226238
+ .long 1057044964
+ .long 2754706541
+ .long 1067875863
+ .long 2187799823
+ .long 1055634437
+ .long 790323742
+ .long 1067402587
+ .long 1372385848
+ .long 1054167831
+ .long 4097292716
+ .long 1065372654
+ .long 3348210357
+ .long 1052830099
+ .long 2442796466
+ .long 1064337602
+ .long 862608142
+ .long 1051347106
+ .long 170296152
+ .long 1062577219
+ .long 3755571428
+ .long 1049933343
+ .long 3614866008
+ .long 1061361670
+ .long 719978496
+ .long 1070185448
+ .long 1998842465
+ .long 1027220329
+ .long 0
+ .long 0
+ .long 3749156607
+ .long 1071048258
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1330165971
+ .long 1060367097
+ .long 0
+ .long 0
+ .long 217536623
+ .long 1059109098
+ .long 0
+ .long 0
+ .long 3492120849
+ .long 1057667827
+ .long 602185705
+ .long 1068194444
+ .long 760422958
+ .long 1056312597
+ .long 555127889
+ .long 1067545266
+ .long 3139784124
+ .long 1054987189
+ .long 3690544014
+ .long 1065666523
+ .long 95707915
+ .long 1053635428
+ .long 4003114407
+ .long 1064581412
+ .long 2034926231
+ .long 1052227513
+ .long 3759536023
+ .long 1063076341
+ .long 3826928214
+ .long 1050893819
+ .long 3837960785
+ .long 1061790379
+ .long 1526325248
+ .long 1070483918
+ .long 2356426521
+ .long 3172907104
+ .long 0
+ .long 0
+ .long 457728975
+ .long 1071088276
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 4294967288
+ .long 1704352102
+ .long 3223426649
+ .long 0
+ .long 0
+ .long 2284589306
+ .long 1076258036
+ .long 0
+ .long 0
+ .long 2211264291
+ .long 3224142658
+ .long 0
+ .long 3221225472
+ .long 1441186365
+ .long 1077028579
+ .long 1431655765
+ .long 1074091349
+ .long 876943673
+ .long 3224837270
+ .long 2863311531
+ .long 3221924522
+ .long 236289504
+ .long 1077767485
+ .long 286331153
+ .long 1074860305
+ .long 2805473311
+ .long 3225598926
+ .long 95443718
+ .long 3222646875
+ .long 1160476131
+ .long 1078450742
+ .long 463583772
+ .long 1075552698
+ .long 0
+ .long 3220176896
+ .long 0
+ .long 0
+ .long 0
+ .long 1073741824
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3349892442
+ .long 3221773860
+ .long 0
+ .long 0
+ .long 3913197405
+ .long 1074501181
+ .long 0
+ .long 0
+ .long 2494034522
+ .long 3222222818
+ .long 1264738763
+ .long 3220568452
+ .long 1520293906
+ .long 1074899632
+ .long 1958936600
+ .long 1073411493
+ .long 2133649635
+ .long 3222535819
+ .long 4270740730
+ .long 3221058356
+ .long 1728930189
+ .long 1075224844
+ .long 1303998552
+ .long 1073799186
+ .long 618611933
+ .long 3222903903
+ .long 1769828046
+ .long 3221422190
+ .long 2200537986
+ .long 1075641421
+ .long 433361110
+ .long 1074105369
+ .long 719595600
+ .long 3219800832
+ .long 294527206
+ .long 1014656440
+ .long 0
+ .long 1073741824
+ .long 3811788216
+ .long 3218400550
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 724322768
+ .long 3220364956
+ .long 0
+ .long 0
+ .long 643153048
+ .long 1072905816
+ .long 0
+ .long 0
+ .long 4285079458
+ .long 3220412206
+ .long 3912524733
+ .long 3220106631
+ .long 118362272
+ .long 1072952754
+ .long 4107767972
+ .long 1072827408
+ .long 2689502883
+ .long 3220460570
+ .long 946523347
+ .long 3220256414
+ .long 573204189
+ .long 1073001761
+ .long 581531518
+ .long 1072826391
+ .long 1386236526
+ .long 3220510607
+ .long 3718905905
+ .long 3220316471
+ .long 1145558140
+ .long 1073052673
+ .long 513572637
+ .long 1072861969
+ .long 716700048
+ .long 3219481016
+ .long 547126769
+ .long 3163007173
+ .long 0
+ .long 1072693248
+ .long 1097907398
+ .long 1071420120
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 3422807297
+ .long 3219124495
+ .long 0
+ .long 0
+ .long 1151658053
+ .long 1071494715
+ .long 0
+ .long 0
+ .long 929607071
+ .long 3218829988
+ .long 1037049034
+ .long 3219520953
+ .long 2786928657
+ .long 1071215282
+ .long 1447406859
+ .long 1072265209
+ .long 3490952107
+ .long 3218574499
+ .long 3205232916
+ .long 3219452306
+ .long 1297344304
+ .long 1070977120
+ .long 1066110976
+ .long 1071946035
+ .long 3803721480
+ .long 3218354730
+ .long 1496754229
+ .long 3219290849
+ .long 2982550683
+ .long 1070773243
+ .long 4014441989
+ .long 1071736222
+ .long 419968236
+ .long 3219200695
+ .long 3451266538
+ .long 1015961163
+ .long 0
+ .long 1072693248
+ .long 2960267235
+ .long 1070745841
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1458794562
+ .long 3217882198
+ .long 0
+ .long 0
+ .long 2857777489
+ .long 1070137637
+ .long 0
+ .long 0
+ .long 1024359517
+ .long 3217360179
+ .long 2616040238
+ .long 3219066585
+ .long 1609024636
+ .long 1069675088
+ .long 2529240549
+ .long 1071836633
+ .long 1510128600
+ .long 3216923761
+ .long 2251697184
+ .long 3218737335
+ .long 1262761453
+ .long 1069142850
+ .long 1263091857
+ .long 1071190461
+ .long 3043383486
+ .long 3216368839
+ .long 2476932470
+ .long 3218325650
+ .long 3659995028
+ .long 1068669200
+ .long 855891755
+ .long 1070696894
+ .long 2583490354
+ .long 3218768505
+ .long 3062633575
+ .long 3161492271
+ .long 0
+ .long 1072693248
+ .long 2550940471
+ .long 1069938201
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 2467582782
+ .long 3216740037
+ .long 0
+ .long 0
+ .long 162150096
+ .long 1068946420
+ .long 0
+ .long 0
+ .long 3702794237
+ .long 3216062800
+ .long 3631919291
+ .long 3218420574
+ .long 3456821413
+ .long 1068217218
+ .long 2031366438
+ .long 1071495745
+ .long 1596664020
+ .long 3215282929
+ .long 1509038701
+ .long 3218085291
+ .long 583171477
+ .long 1067510148
+ .long 3785344682
+ .long 1070618476
+ .long 2402036048
+ .long 3214559384
+ .long 3233018412
+ .long 3217396834
+ .long 411280568
+ .long 1066710556
+ .long 1065584192
+ .long 1069747896
+ .long 895247324
+ .long 3218303496
+ .long 500078909
+ .long 1013805133
+ .long 0
+ .long 1072693248
+ .long 729983843
+ .long 1068994194
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1512545955
+ .long 3215602695
+ .long 0
+ .long 0
+ .long 1127048698
+ .long 1067909459
+ .long 0
+ .long 0
+ .long 2300200450
+ .long 3214738415
+ .long 3593250296
+ .long 3217717209
+ .long 3009365544
+ .long 1066902117
+ .long 1127373050
+ .long 1071173457
+ .long 3046103305
+ .long 3213854947
+ .long 24583402
+ .long 3217207636
+ .long 4082511758
+ .long 1065914199
+ .long 3223889699
+ .long 1070020367
+ .long 548927984
+ .long 3212899404
+ .long 558065897
+ .long 3216433066
+ .long 680073315
+ .long 1064940726
+ .long 388873200
+ .long 1068944270
+ .long 3763679576
+ .long 3217651189
+ .long 1497360404
+ .long 3157194195
+ .long 0
+ .long 1072693248
+ .long 64931152
+ .long 1067729411
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .long 1313038235
+ .long 3214229379
+ .long 0
+ .long 0
+ .long 1013878342
+ .long 1067152618
+ .long 0
+ .long 0
+ .long 3663426833
+ .long 3213208931
+ .long 3693284251
+ .long 3216602456
+ .long 650852232
+ .long 1065882376
+ .long 1996245381
+ .long 1071000265
+ .long 2008746170
+ .long 3212147845
+ .long 3055842593
+ .long 3216062494
+ .long 1495406348
+ .long 1064652437
+ .long 2269530157
+ .long 1069711235
+ .long 285563696
+ .long 3211060113
+ .long 1046897440
+ .long 3215189513
+ .long 233429731
+ .long 1063453151
+ .long 522045958
+ .long 1068476590
+ .long 2354785698
+ .long 3216586427
+ .long 1317599141
+ .long 3159915781
+ .long 0
+ .long 1072693248
+ .long 2828230105
+ .long 1065606626
+ .long 0
+ .long 0
+ .long 0
+ .long 0
+ .type Ctable,@object
+ .size Ctable,5632
+ .align 16
+MASK_35:
+ .long 4294705152
+ .long 4294967295
+ .long 0
+ .long 0
+ .type MASK_35,@object
+ .size MASK_35,16
+ .align 16
+Q_11:
+ .long 3103673719
+ .long 1065509018
+ .type Q_11,@object
+ .size Q_11,8
+ .space 8, 0x00 # pad
+ .align 16
+Q_9:
+ .long 3213130307
+ .long 1066820768
+ .type Q_9,@object
+ .size Q_9,8
+ .space 8, 0x00 # pad
+ .align 16
+Q_7:
+ .long 1388628139
+ .long 1068212666
+ .type Q_7,@object
+ .size Q_7,8
+ .space 8, 0x00 # pad
+ .align 16
+Q_5:
+ .long 285812550
+ .long 1069617425
+ .type Q_5,@object
+ .size Q_5,8
+ .space 8, 0x00 # pad
+ .align 16
+Q_3:
+ .long 1431655954
+ .long 1070945621
+ .type Q_3,@object
+ .size Q_3,8
+ .space 8, 0x00 # pad
+ .align 16
+PI_INV_TABLE:
+ .long 0
+ .long 0
+ .long 2734261102
+ .long 1313084713
+ .long 4230436817
+ .long 4113882560
+ .long 3680671129
+ .long 1011060801
+ .long 4266746795
+ .long 3736847713
+ .long 3072618042
+ .long 1112396512
+ .long 105459434
+ .long 164729372
+ .long 4263373596
+ .long 2972297022
+ .long 3900847605
+ .long 784024708
+ .long 3919343654
+ .long 3026157121
+ .long 965858873
+ .long 2203269620
+ .long 2625920907
+ .long 3187222587
+ .long 536385535
+ .long 3724908559
+ .long 4012839307
+ .long 1510632735
+ .long 1832287951
+ .long 667617719
+ .long 1330003814
+ .long 2657085997
+ .long 1965537991
+ .long 3957715323
+ .long 1023883767
+ .long 2320667370
+ .long 1811636145
+ .long 529358088
+ .long 1443049542
+ .long 4235946923
+ .long 4040145953
+ .type PI_INV_TABLE,@object
+ .size PI_INV_TABLE,164
+ .space 12, 0x00 # pad
+ .align 16
+PI_4:
+ .long 0
+ .long 1072243195
+ .long 1175561766
+ .long 1048908043
+ .type PI_4,@object
+ .size PI_4,16
+ .align 8
+QQ_2:
+ .long 1734816687
+ .long 1026746297
+ .type QQ_2,@object
+ .size QQ_2,8
+ .align 8
+ONE:
+ .long 0
+ .long 1072693248
+ .type ONE,@object
+ .size ONE,8
+ .align 8
+TWO_POW_55:
+ .long 0
+ .long 1130364928
+ .type TWO_POW_55,@object
+ .size TWO_POW_55,8
+ .align 8
+TWO_POW_M55:
+ .long 0
+ .long 1015021568
+ .type TWO_POW_M55,@object
+ .size TWO_POW_M55,8
+ .align 4
+NEG_ZERO:
+ .long 0
+ .long 2147483648
+ .type NEG_ZERO,@object
+ .size NEG_ZERO,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000002c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_tan.1-.
+ .4byte ..___tag_value_tan.9-..___tag_value_tan.1
+ .2byte 0x0400
+ .4byte ..___tag_value_tan.3-..___tag_value_tan.1
+ .4byte 0x0283100e
+ .byte 0x04
+ .4byte ..___tag_value_tan.5-..___tag_value_tan.3
+ .2byte 0x200e
+ .byte 0x04
+ .4byte ..___tag_value_tan.6-..___tag_value_tan.5
+ .4byte 0x04c3100e
+ .4byte ..___tag_value_tan.8-..___tag_value_tan.6
+ .2byte 0x080e
+# End
diff --git a/libm/x86_64/s_tanh.S b/libm/x86_64/s_tanh.S
new file mode 100644
index 0000000..2c8f9bf
--- /dev/null
+++ b/libm/x86_64/s_tanh.S
@@ -0,0 +1,1392 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************/
+// ALGORITHM DESCRIPTION
+// ---------------------
+//
+// tanh(x)=(exp(x)-exp(-x))/(exp(x)+exp(-x))=(1-exp(-2*x))/(1+exp(-2*x))
+//
+// Let |x|=xH+xL (upper 26 bits, lower 27 bits)
+// log2(e) rounded to 26 bits (high part) plus a double precision low part is
+// L2EH+L2EL (upper 26, lower 53 bits)
+//
+// Let xH*L2EH=k+f+r`, where (k+f)*2^8*2=int(xH*L2EH*2^9),
+// f=0.b1 b2 ... b8, k integer
+// 2^{-f} is approximated as Tn[f]+Dn[f]
+// Tn stores the high 53 bits, Dn stores (2^{-f}-Tn[f]) rounded to double precision
+//
+// r=r`+xL*L2EH+|x|*L2EL, |r|<2^{-9}+2^{-14},
+// for |x| in [23/64,3*2^7)
+// e^{-2*|x|}=2^{-k-f}*2^{-r} ~ 2^{-k}*(Tn+Dn)*(1+p)=(T0+D0)*(1+p)
+//
+// For |x| in [2^{-4},2^5):
+// 2^{-r}-1 ~ p=c1*r+c2*r^2+..+c5*r^5
+// Let R=1/(1+T0+p*T0), truncated to 35 significant bits
+// R=1/(1+T0+D0+p*(T0+D0))*(1+eps), |eps|<2^{-33}
+// 1+T0+D0+p*(T0+D0)=KH+KL, where
+// KH=(1+T0+c1*r*T0)_high (leading 17 bits)
+// KL=T0_low+D0+(c1*r*T0)_low+c1*r*D0+(c2*r^2+..c5*r^5)*T0
+// eps ~ (R*KH-1)+R*KL
+// 1/(1+T0+D0+p*(T0+D0)) ~ R-R*eps
+// The result is approximated as (1-T0-D0-(T0+D0)*p)*(R-R*eps)
+// 1-T0-D0-(T0+D0)*p=-((KH-2)+KL)
+// The result is formed as
+// (KH-2)*R+(-(KH-2)*R*eps+(KL*R-KL*R*eps)), with the correct sign
+// set at the end
+//
+// For |x| in [2^{-64},2^{-4}):
+// A Taylor series expansion is used (x+p3*x^3+..+p13*x^{13})
+//
+// For |x|<2^{-64}: x is returned
+//
+// For |x|>=2^32: return +/-1
+//
+// Special cases:
+// tanh(NaN) = quiet NaN, and raise invalid exception
+// tanh(INF) = that INF
+// tanh(+/-0) = +/-0
+//
+/******************************************************************************/
+
+#include <private/bionic_asm.h>
+# -- Begin tanh
+ENTRY(tanh)
+# parameter 1: %xmm0
+..B1.1:
+..___tag_value_tanh.1:
+ pushq %rsi
+..___tag_value_tanh.3:
+..B1.2:
+ movsd HALFMASK(%rip), %xmm3
+ xorpd %xmm4, %xmm4
+ movsd L2E(%rip), %xmm1
+ movsd 8+L2E(%rip), %xmm2
+ movl $32768, %eax
+ pinsrw $3, %eax, %xmm4
+ movsd Shifter(%rip), %xmm6
+ pextrw $3, %xmm0, %ecx
+ andpd %xmm0, %xmm3
+ andnpd %xmm0, %xmm4
+ pshufd $68, %xmm4, %xmm5
+ movl $32768, %edx
+ andl %ecx, %edx
+ andl $32767, %ecx
+ subl $16304, %ecx
+ cmpl $144, %ecx
+ jae .L_2TAG_PACKET_0.0.1
+ subsd %xmm3, %xmm4
+ mulsd %xmm1, %xmm3
+ mulsd %xmm5, %xmm2
+ cvtsd2si %xmm3, %eax
+ movq %xmm3, %xmm7
+ addsd %xmm6, %xmm3
+ mulsd %xmm4, %xmm1
+ movsd ONEMASK(%rip), %xmm4
+ subsd %xmm6, %xmm3
+ xorpd %xmm0, %xmm0
+ addsd %xmm1, %xmm2
+ subsd %xmm3, %xmm7
+ movapd cv(%rip), %xmm6
+ addsd %xmm7, %xmm2
+ movl $255, %ecx
+ andl %eax, %ecx
+ addl %ecx, %ecx
+ lea T2_neg_f(%rip), %r8
+ movapd (%r8,%rcx,8), %xmm5
+ shrl $4, %eax
+ andl $65520, %eax
+ subl $16368, %eax
+ negl %eax
+ pinsrw $3, %eax, %xmm0
+ movapd 16+cv(%rip), %xmm1
+ pshufd $68, %xmm0, %xmm0
+ mulpd %xmm5, %xmm0
+ movsd 32+cv(%rip), %xmm7
+ pshufd $68, %xmm2, %xmm2
+ movq %xmm4, %xmm5
+ addsd %xmm0, %xmm4
+ mulpd %xmm2, %xmm6
+ mulsd %xmm2, %xmm7
+ mulpd %xmm2, %xmm2
+ addpd %xmm6, %xmm1
+ mulsd %xmm2, %xmm2
+ movsd ONEMASK(%rip), %xmm3
+ mulpd %xmm2, %xmm1
+ pshufd $78, %xmm1, %xmm6
+ addsd %xmm6, %xmm1
+ movq %xmm1, %xmm6
+ addsd %xmm7, %xmm1
+ mulsd %xmm0, %xmm1
+ addsd %xmm4, %xmm1
+ andpd MASK3(%rip), %xmm4
+ divsd %xmm1, %xmm5
+ subsd %xmm4, %xmm3
+ pshufd $238, %xmm0, %xmm1
+ addsd %xmm0, %xmm3
+ movq %xmm4, %xmm2
+ addsd %xmm1, %xmm3
+ mulsd %xmm7, %xmm1
+ mulsd %xmm0, %xmm7
+ addsd %xmm1, %xmm3
+ addsd %xmm7, %xmm4
+ movsd RMASK(%rip), %xmm1
+ mulsd %xmm0, %xmm6
+ andpd MASK3(%rip), %xmm4
+ addsd %xmm6, %xmm3
+ movq %xmm4, %xmm6
+ subsd %xmm4, %xmm2
+ addsd %xmm7, %xmm2
+ movsd ONEMASK(%rip), %xmm7
+ andpd %xmm1, %xmm5
+ addsd %xmm2, %xmm3
+ mulsd %xmm5, %xmm4
+ xorpd %xmm2, %xmm2
+ mulsd %xmm5, %xmm3
+ subsd TWOMASK(%rip), %xmm6
+ subsd %xmm7, %xmm4
+ xorl $32768, %edx
+ pinsrw $3, %edx, %xmm2
+ addsd %xmm3, %xmm4
+ mulsd %xmm5, %xmm6
+ movq %xmm3, %xmm1
+ mulsd %xmm4, %xmm3
+ movq %xmm6, %xmm0
+ mulsd %xmm4, %xmm6
+ subsd %xmm3, %xmm1
+ subsd %xmm6, %xmm1
+ addsd %xmm1, %xmm0
+ xorpd %xmm2, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_0.0.1:
+ addl $960, %ecx
+ cmpl $1104, %ecx
+ jae .L_2TAG_PACKET_1.0.1
+ movapd pv(%rip), %xmm2
+ pshufd $68, %xmm0, %xmm1
+ movapd 16+pv(%rip), %xmm3
+ mulpd %xmm1, %xmm1
+ movapd 32+pv(%rip), %xmm4
+ mulpd %xmm1, %xmm2
+ pshufd $68, %xmm1, %xmm5
+ addpd %xmm3, %xmm2
+ mulsd %xmm5, %xmm5
+ mulpd %xmm1, %xmm2
+ mulsd %xmm5, %xmm5
+ addpd %xmm4, %xmm2
+ mulpd %xmm5, %xmm2
+ pshufd $238, %xmm2, %xmm5
+ addsd %xmm5, %xmm2
+ mulsd %xmm0, %xmm2
+ addsd %xmm2, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_1.0.1:
+ addl $15344, %ecx
+ cmpl $16448, %ecx
+ jae .L_2TAG_PACKET_2.0.1
+ cmpl $16, %ecx
+ jb .L_2TAG_PACKET_3.0.1
+ xorpd %xmm2, %xmm2
+ movl $17392, %eax
+ pinsrw $3, %eax, %xmm2
+ mulsd %xmm0, %xmm2
+ addsd %xmm0, %xmm2
+ jmp ..B1.4
+.L_2TAG_PACKET_3.0.1:
+ movq %xmm0, %xmm2
+ mulsd %xmm2, %xmm2
+ jmp ..B1.4
+.L_2TAG_PACKET_2.0.1:
+ cmpl $32752, %ecx
+ jae .L_2TAG_PACKET_4.0.1
+ xorpd %xmm2, %xmm2
+ movl $15344, %ecx
+ pinsrw $3, %ecx, %xmm2
+ movq %xmm2, %xmm3
+ mulsd %xmm2, %xmm2
+ addsd %xmm3, %xmm2
+.L_2TAG_PACKET_5.0.1:
+ xorpd %xmm0, %xmm0
+ orl $16368, %edx
+ pinsrw $3, %edx, %xmm0
+ jmp ..B1.4
+.L_2TAG_PACKET_4.0.1:
+ movq %xmm0, %xmm2
+ movd %xmm0, %eax
+ psrlq $20, %xmm2
+ movd %xmm2, %ecx
+ orl %eax, %ecx
+ cmpl $0, %ecx
+ je .L_2TAG_PACKET_5.0.1
+ addsd %xmm0, %xmm0
+ movq %xmm0, (%rsp)
+.L_2TAG_PACKET_6.0.1:
+..B1.4:
+ popq %rcx
+..___tag_value_tanh.4:
+ ret
+..___tag_value_tanh.5:
+END(tanh)
+# -- End tanh
+ .section .rodata, "a"
+ .align 16
+ .align 16
+L2E:
+ .long 1610612736
+ .long 1082594631
+ .long 4166901572
+ .long 1055174155
+ .type L2E,@object
+ .size L2E,16
+ .align 16
+Shifter:
+ .long 0
+ .long 1127743488
+ .long 0
+ .long 3275227136
+ .type Shifter,@object
+ .size Shifter,16
+ .align 16
+cv:
+ .long 3884607281
+ .long 3168131199
+ .long 3607404735
+ .long 3190582024
+ .long 1874480759
+ .long 1032041131
+ .long 4286760334
+ .long 1053736893
+ .long 4277811695
+ .long 3211144770
+ .long 0
+ .long 0
+ .type cv,@object
+ .size cv,48
+ .align 16
+T2_neg_f:
+ .long 0
+ .long 1072693248
+ .long 0
+ .long 0
+ .long 1797923801
+ .long 1072687577
+ .long 1950547427
+ .long 1013229059
+ .long 730821105
+ .long 1072681922
+ .long 2523232743
+ .long 1012067188
+ .long 915592468
+ .long 1072676282
+ .long 352947894
+ .long 3161024371
+ .long 2174652632
+ .long 1072670657
+ .long 4087714590
+ .long 1014450259
+ .long 35929225
+ .long 1072665048
+ .long 2809788041
+ .long 3159436968
+ .long 2912730644
+ .long 1072659453
+ .long 3490067722
+ .long 3163405074
+ .long 2038973688
+ .long 1072653874
+ .long 892941374
+ .long 1016046459
+ .long 1533953344
+ .long 1072648310
+ .long 769171851
+ .long 1015665633
+ .long 1222472308
+ .long 1072642761
+ .long 1054357470
+ .long 3161021018
+ .long 929806999
+ .long 1072637227
+ .long 3205336643
+ .long 1015259557
+ .long 481706282
+ .long 1072631708
+ .long 1696079173
+ .long 3162710528
+ .long 3999357479
+ .long 1072626203
+ .long 2258941616
+ .long 1015924724
+ .long 2719515920
+ .long 1072620714
+ .long 2760332941
+ .long 1015137933
+ .long 764307441
+ .long 1072615240
+ .long 3021057420
+ .long 3163329523
+ .long 2256325230
+ .long 1072609780
+ .long 580117746
+ .long 1015317295
+ .long 2728693978
+ .long 1072604335
+ .long 396109971
+ .long 3163462691
+ .long 2009970496
+ .long 1072598905
+ .long 2159039665
+ .long 3162572948
+ .long 4224142467
+ .long 1072593489
+ .long 3389820386
+ .long 1015207202
+ .long 610758006
+ .long 1072588089
+ .long 1965209397
+ .long 3161866232
+ .long 3884662774
+ .long 1072582702
+ .long 2158611599
+ .long 1014210185
+ .long 991358482
+ .long 1072577331
+ .long 838715019
+ .long 3163157668
+ .long 351641897
+ .long 1072571974
+ .long 2172261526
+ .long 3163010599
+ .long 1796832535
+ .long 1072566631
+ .long 3176955716
+ .long 3160585513
+ .long 863738719
+ .long 1072561303
+ .long 1326992220
+ .long 3162613197
+ .long 1679558232
+ .long 1072555989
+ .long 2390342287
+ .long 3163333970
+ .long 4076975200
+ .long 1072550689
+ .long 2029000899
+ .long 1015208535
+ .long 3594158869
+ .long 1072545404
+ .long 2456521700
+ .long 3163256561
+ .long 64696965
+ .long 1072540134
+ .long 1768797490
+ .long 1015816960
+ .long 1912561781
+ .long 1072534877
+ .long 3147495102
+ .long 1015678253
+ .long 382305176
+ .long 1072529635
+ .long 2347622376
+ .long 3162578625
+ .long 3898795731
+ .long 1072524406
+ .long 1249994144
+ .long 1011869818
+ .long 3707479175
+ .long 1072519192
+ .long 3613079303
+ .long 1014164738
+ .long 3939148246
+ .long 1072513992
+ .long 3210352148
+ .long 1015274323
+ .long 135105010
+ .long 1072508807
+ .long 1906148728
+ .long 3163375739
+ .long 721996136
+ .long 1072503635
+ .long 563754734
+ .long 1015371318
+ .long 1242007932
+ .long 1072498477
+ .long 1132034716
+ .long 3163339831
+ .long 1532734324
+ .long 1072493333
+ .long 3094216535
+ .long 3163162857
+ .long 1432208378
+ .long 1072488203
+ .long 1401068914
+ .long 3162363963
+ .long 778901109
+ .long 1072483087
+ .long 2248183955
+ .long 3161268751
+ .long 3706687593
+ .long 1072477984
+ .long 3521726940
+ .long 1013253067
+ .long 1464976603
+ .long 1072472896
+ .long 3507292405
+ .long 3161977534
+ .long 2483480501
+ .long 1072467821
+ .long 1216371780
+ .long 1013034172
+ .long 2307442995
+ .long 1072462760
+ .long 3190117721
+ .long 3162404539
+ .long 777507147
+ .long 1072457713
+ .long 4282924205
+ .long 1015187533
+ .long 2029714210
+ .long 1072452679
+ .long 613660079
+ .long 1015099143
+ .long 1610600570
+ .long 1072447659
+ .long 3766732298
+ .long 1015760183
+ .long 3657065772
+ .long 1072442652
+ .long 399025623
+ .long 3162957078
+ .long 3716502172
+ .long 1072437659
+ .long 2303740125
+ .long 1014042725
+ .long 1631695677
+ .long 1072432680
+ .long 2717633076
+ .long 3162344026
+ .long 1540824585
+ .long 1072427714
+ .long 1064017011
+ .long 3163487690
+ .long 3287523847
+ .long 1072422761
+ .long 1625971539
+ .long 3157009955
+ .long 2420883922
+ .long 1072417822
+ .long 2049810052
+ .long 1014119888
+ .long 3080351519
+ .long 1072412896
+ .long 3379126788
+ .long 3157218001
+ .long 815859274
+ .long 1072407984
+ .long 240396590
+ .long 3163487443
+ .long 4062661092
+ .long 1072403084
+ .long 1422616006
+ .long 3163255318
+ .long 4076559943
+ .long 1072398198
+ .long 2119478331
+ .long 3160758351
+ .long 703710506
+ .long 1072393326
+ .long 1384660846
+ .long 1015195891
+ .long 2380618042
+ .long 1072388466
+ .long 3149557219
+ .long 3163320799
+ .long 364333489
+ .long 1072383620
+ .long 3923737744
+ .long 3161421373
+ .long 3092190715
+ .long 1072378786
+ .long 814012168
+ .long 3159523422
+ .long 1822067026
+ .long 1072373966
+ .long 1241994956
+ .long 1015340290
+ .long 697153126
+ .long 1072369159
+ .long 1283515429
+ .long 3163283189
+ .long 3861050111
+ .long 1072364364
+ .long 254893773
+ .long 3162813180
+ .long 2572866477
+ .long 1072359583
+ .long 878562433
+ .long 1015521741
+ .long 977020788
+ .long 1072354815
+ .long 3065100517
+ .long 1015541563
+ .long 3218338682
+ .long 1072350059
+ .long 3404164304
+ .long 3162477108
+ .long 557149882
+ .long 1072345317
+ .long 3672720709
+ .long 1014537265
+ .long 1434058175
+ .long 1072340587
+ .long 251133233
+ .long 1015085769
+ .long 1405169241
+ .long 1072335870
+ .long 2998539689
+ .long 3162830951
+ .long 321958744
+ .long 1072331166
+ .long 3401933767
+ .long 1015794558
+ .long 2331271250
+ .long 1072326474
+ .long 812057446
+ .long 1012207446
+ .long 2990417245
+ .long 1072321795
+ .long 3683467745
+ .long 3163369326
+ .long 2152073944
+ .long 1072317129
+ .long 1486860576
+ .long 3163203456
+ .long 3964284211
+ .long 1072312475
+ .long 2111583915
+ .long 1015427164
+ .long 3985553595
+ .long 1072307834
+ .long 4002146062
+ .long 1015834136
+ .long 2069751141
+ .long 1072303206
+ .long 1562170675
+ .long 3162724681
+ .long 2366108318
+ .long 1072298590
+ .long 2867985102
+ .long 3161762254
+ .long 434316067
+ .long 1072293987
+ .long 2028358766
+ .long 1013458122
+ .long 424392917
+ .long 1072289396
+ .long 2749202995
+ .long 3162838718
+ .long 2191782032
+ .long 1072284817
+ .long 2960257726
+ .long 1013742662
+ .long 1297350157
+ .long 1072280251
+ .long 1308022040
+ .long 3163412558
+ .long 1892288442
+ .long 1072275697
+ .long 2446255666
+ .long 3162600381
+ .long 3833209506
+ .long 1072271155
+ .long 2722920684
+ .long 1013754842
+ .long 2682146384
+ .long 1072266626
+ .long 2082178513
+ .long 3163363419
+ .long 2591453363
+ .long 1072262109
+ .long 2132396182
+ .long 3159074198
+ .long 3418903055
+ .long 1072257604
+ .long 2527457337
+ .long 3160820604
+ .long 727685349
+ .long 1072253112
+ .long 2038246809
+ .long 3162358742
+ .long 2966275557
+ .long 1072248631
+ .long 2176155324
+ .long 3159842759
+ .long 1403662306
+ .long 1072244163
+ .long 2788809599
+ .long 3161671007
+ .long 194117574
+ .long 1072239707
+ .long 777528612
+ .long 3163412089
+ .long 3492293770
+ .long 1072235262
+ .long 2248032210
+ .long 1015386826
+ .long 2568320822
+ .long 1072230830
+ .long 2732824428
+ .long 1014352915
+ .long 1577608921
+ .long 1072226410
+ .long 1875489510
+ .long 3162968394
+ .long 380978316
+ .long 1072222002
+ .long 854188970
+ .long 3160462686
+ .long 3134592888
+ .long 1072217605
+ .long 4232266862
+ .long 1015991134
+ .long 1110089947
+ .long 1072213221
+ .long 1451641639
+ .long 1015474673
+ .long 2759350287
+ .long 1072208848
+ .long 1148526634
+ .long 1015894933
+ .long 3649726105
+ .long 1072204487
+ .long 4085036346
+ .long 1015649474
+ .long 3643909174
+ .long 1072200138
+ .long 3537586109
+ .long 1014354647
+ .long 2604962541
+ .long 1072195801
+ .long 2614425274
+ .long 3163539192
+ .long 396319521
+ .long 1072191476
+ .long 4172420816
+ .long 3159074632
+ .long 1176749997
+ .long 1072187162
+ .long 2738998779
+ .long 3162035844
+ .long 515457527
+ .long 1072182860
+ .long 836709333
+ .long 1015651226
+ .long 2571947539
+ .long 1072178569
+ .long 3558159064
+ .long 3163376669
+ .long 2916157145
+ .long 1072174290
+ .long 219487565
+ .long 1015309367
+ .long 1413356050
+ .long 1072170023
+ .long 1651349291
+ .long 3162668166
+ .long 2224145553
+ .long 1072165767
+ .long 3482522030
+ .long 3161489169
+ .long 919555682
+ .long 1072161523
+ .long 3121969534
+ .long 1012948226
+ .long 1660913392
+ .long 1072157290
+ .long 4218599604
+ .long 1015135707
+ .long 19972402
+ .long 1072153069
+ .long 3507899862
+ .long 1016009292
+ .long 158781403
+ .long 1072148859
+ .long 2221464712
+ .long 3163286453
+ .long 1944781191
+ .long 1072144660
+ .long 3993278767
+ .long 3161724279
+ .long 950803702
+ .long 1072140473
+ .long 1655364926
+ .long 1015237032
+ .long 1339972927
+ .long 1072136297
+ .long 167908909
+ .long 1015572152
+ .long 2980802057
+ .long 1072132132
+ .long 378619896
+ .long 1015773303
+ .long 1447192521
+ .long 1072127979
+ .long 1462857171
+ .long 3162514521
+ .long 903334909
+ .long 1072123837
+ .long 1636462108
+ .long 1015039997
+ .long 1218806132
+ .long 1072119706
+ .long 1818613052
+ .long 3162548441
+ .long 2263535754
+ .long 1072115586
+ .long 752233586
+ .long 3162639008
+ .long 3907805044
+ .long 1072111477
+ .long 2257091225
+ .long 3161550407
+ .long 1727278727
+ .long 1072107380
+ .long 3562710623
+ .long 1011471940
+ .long 4182873220
+ .long 1072103293
+ .long 629542646
+ .long 3161996303
+ .long 2555984613
+ .long 1072099218
+ .long 2652555442
+ .long 3162552692
+ .long 1013258799
+ .long 1072095154
+ .long 1748797611
+ .long 3160129082
+ .long 3721688645
+ .long 1072091100
+ .long 3069276937
+ .long 1015839401
+ .long 1963711167
+ .long 1072087058
+ .long 1744767757
+ .long 3160574294
+ .long 4201977662
+ .long 1072083026
+ .long 748330254
+ .long 1013594357
+ .long 1719614413
+ .long 1072079006
+ .long 330458198
+ .long 3163282740
+ .long 2979960120
+ .long 1072074996
+ .long 2599109725
+ .long 1014498493
+ .long 3561793907
+ .long 1072070997
+ .long 1157054053
+ .long 1011890350
+ .long 3339203574
+ .long 1072067009
+ .long 1483497780
+ .long 3162408754
+ .long 2186617381
+ .long 1072063032
+ .long 2270764084
+ .long 3163272713
+ .long 4273770423
+ .long 1072059065
+ .long 3383180809
+ .long 3163218901
+ .long 885834528
+ .long 1072055110
+ .long 1973258547
+ .long 3162261564
+ .long 488188413
+ .long 1072051165
+ .long 3199821029
+ .long 1015564048
+ .long 2956612997
+ .long 1072047230
+ .long 2118169751
+ .long 3162735553
+ .long 3872257780
+ .long 1072043306
+ .long 1253592103
+ .long 1015958334
+ .long 3111574537
+ .long 1072039393
+ .long 2606161479
+ .long 3162759746
+ .long 551349105
+ .long 1072035491
+ .long 3821916050
+ .long 3162106589
+ .long 363667784
+ .long 1072031599
+ .long 813753950
+ .long 1015785209
+ .long 2425981843
+ .long 1072027717
+ .long 2830390851
+ .long 3163346599
+ .long 2321106615
+ .long 1072023846
+ .long 2171176610
+ .long 1009535771
+ .long 4222122499
+ .long 1072019985
+ .long 1277378074
+ .long 3163256737
+ .long 3712504873
+ .long 1072016135
+ .long 88491949
+ .long 1015427660
+ .long 671025100
+ .long 1072012296
+ .long 3832014351
+ .long 3163022030
+ .long 3566716925
+ .long 1072008466
+ .long 1536826856
+ .long 1014142433
+ .long 3689071823
+ .long 1072004647
+ .long 2321004996
+ .long 3162552716
+ .long 917841882
+ .long 1072000839
+ .long 18715565
+ .long 1015659308
+ .long 3723038930
+ .long 1071997040
+ .long 378465264
+ .long 3162569582
+ .long 3395129871
+ .long 1071993252
+ .long 4025345435
+ .long 3162335388
+ .long 4109806887
+ .long 1071989474
+ .long 422403966
+ .long 1014469229
+ .long 1453150082
+ .long 1071985707
+ .long 498154669
+ .long 3161488062
+ .long 3896463087
+ .long 1071981949
+ .long 1139797873
+ .long 3161233805
+ .long 2731501122
+ .long 1071978202
+ .long 1774031855
+ .long 3162470021
+ .long 2135241198
+ .long 1071974465
+ .long 1236747871
+ .long 1013589147
+ .long 1990012071
+ .long 1071970738
+ .long 3529070563
+ .long 3162813193
+ .long 2178460671
+ .long 1071967021
+ .long 777878098
+ .long 3162842493
+ .long 2583551245
+ .long 1071963314
+ .long 3161094195
+ .long 1015606491
+ .long 3088564500
+ .long 1071959617
+ .long 1762311517
+ .long 1015045673
+ .long 3577096743
+ .long 1071955930
+ .long 2951496418
+ .long 1013793687
+ .long 3933059031
+ .long 1071952253
+ .long 2133366768
+ .long 3161531832
+ .long 4040676318
+ .long 1071948586
+ .long 4090609238
+ .long 1015663458
+ .long 3784486610
+ .long 1071944929
+ .long 1581883040
+ .long 3161698953
+ .long 3049340112
+ .long 1071941282
+ .long 3062915824
+ .long 1013170595
+ .long 1720398391
+ .long 1071937645
+ .long 3980678963
+ .long 3163300080
+ .long 3978100823
+ .long 1071934017
+ .long 3513027190
+ .long 1015845963
+ .long 1118294578
+ .long 1071930400
+ .long 2197495694
+ .long 3159909401
+ .long 1617004845
+ .long 1071926792
+ .long 82804944
+ .long 1010342778
+ .long 1065662932
+ .long 1071923194
+ .long 2533670915
+ .long 1014530238
+ .long 3645941911
+ .long 1071919605
+ .long 3814685081
+ .long 3161573341
+ .long 654919306
+ .long 1071916027
+ .long 3232961757
+ .long 3163047469
+ .long 569847338
+ .long 1071912458
+ .long 472945272
+ .long 3159290729
+ .long 3278348324
+ .long 1071908898
+ .long 3069497416
+ .long 1014750712
+ .long 78413852
+ .long 1071905349
+ .long 4183226867
+ .long 3163017251
+ .long 3743175029
+ .long 1071901808
+ .long 2072812490
+ .long 3162175075
+ .long 1276261410
+ .long 1071898278
+ .long 300981948
+ .long 1014684169
+ .long 1156440435
+ .long 1071894757
+ .long 2351451249
+ .long 1013967056
+ .long 3272845541
+ .long 1071891245
+ .long 928852419
+ .long 3163488248
+ .long 3219942644
+ .long 1071887743
+ .long 3798990616
+ .long 1015368806
+ .long 887463927
+ .long 1071884251
+ .long 3596744163
+ .long 3160794166
+ .long 460407023
+ .long 1071880768
+ .long 4237175092
+ .long 3163138469
+ .long 1829099622
+ .long 1071877294
+ .long 1016661181
+ .long 3163461005
+ .long 589198666
+ .long 1071873830
+ .long 2664346172
+ .long 3163157962
+ .long 926591435
+ .long 1071870375
+ .long 3208833762
+ .long 3162913514
+ .long 2732492859
+ .long 1071866929
+ .long 2691479646
+ .long 3162255684
+ .long 1603444721
+ .long 1071863493
+ .long 1548633640
+ .long 3162201326
+ .long 1726216749
+ .long 1071860066
+ .long 2466808228
+ .long 3161676405
+ .long 2992903935
+ .long 1071856648
+ .long 2218154406
+ .long 1015228193
+ .long 1000925746
+ .long 1071853240
+ .long 1018491672
+ .long 3163309544
+ .long 4232894513
+ .long 1071849840
+ .long 2383938684
+ .long 1014668519
+ .long 3991843581
+ .long 1071846450
+ .long 4092853457
+ .long 1014585763
+ .long 171030293
+ .long 1071843070
+ .long 3526460132
+ .long 1014428778
+ .long 1253935211
+ .long 1071839698
+ .long 1395382931
+ .long 3159702613
+ .long 2839424854
+ .long 1071836335
+ .long 1171596163
+ .long 1013041679
+ .long 526652809
+ .long 1071832982
+ .long 4223459736
+ .long 1015879375
+ .long 2799960843
+ .long 1071829637
+ .long 1423655381
+ .long 1015022151
+ .long 964107055
+ .long 1071826302
+ .long 2800439588
+ .long 3162833221
+ .long 3504003472
+ .long 1071822975
+ .long 3594001060
+ .long 3157330652
+ .long 1724976915
+ .long 1071819658
+ .long 420909223
+ .long 3163117379
+ .long 4112506593
+ .long 1071816349
+ .long 2947355221
+ .long 1014371048
+ .long 1972484976
+ .long 1071813050
+ .long 675290301
+ .long 3161640050
+ .long 3790955393
+ .long 1071809759
+ .long 2352942462
+ .long 3163180090
+ .long 874372905
+ .long 1071806478
+ .long 100263788
+ .long 1015940732
+ .long 1709341917
+ .long 1071803205
+ .long 2571168217
+ .long 1014152499
+ .long 1897844341
+ .long 1071799941
+ .long 1254300460
+ .long 1015275938
+ .long 1337108031
+ .long 1071796686
+ .long 3203724452
+ .long 1014677845
+ .long 4219606026
+ .long 1071793439
+ .long 2434574742
+ .long 1014681548
+ .long 1853186616
+ .long 1071790202
+ .long 3066496371
+ .long 1015656574
+ .long 2725843665
+ .long 1071786973
+ .long 1433917087
+ .long 1014838523
+ .long 2440944790
+ .long 1071783753
+ .long 2492769774
+ .long 1014147454
+ .long 897099801
+ .long 1071780542
+ .long 754756297
+ .long 1015241005
+ .long 2288159958
+ .long 1071777339
+ .long 2169144469
+ .long 1014876021
+ .long 2218315341
+ .long 1071774145
+ .long 2694295388
+ .long 3163288868
+ .long 586995997
+ .long 1071770960
+ .long 41662348
+ .long 3162627992
+ .long 1588871207
+ .long 1071767783
+ .long 143439582
+ .long 3162963416
+ .long 828946858
+ .long 1071764615
+ .long 10642492
+ .long 1015939438
+ .long 2502433899
+ .long 1071761455
+ .long 2148595913
+ .long 1015023991
+ .long 2214878420
+ .long 1071758304
+ .long 892270087
+ .long 3163116422
+ .long 4162030108
+ .long 1071755161
+ .long 2763428480
+ .long 1015529349
+ .long 3949972341
+ .long 1071752027
+ .long 2068408548
+ .long 1014913868
+ .long 1480023343
+ .long 1071748902
+ .long 2247196168
+ .long 1015327453
+ .long 948735466
+ .long 1071745785
+ .long 3516338028
+ .long 3162574883
+ .long 2257959872
+ .long 1071742676
+ .long 3802946148
+ .long 1012964927
+ .long 1014845819
+ .long 1071739576
+ .long 3117910646
+ .long 3161559105
+ .long 1416741826
+ .long 1071736484
+ .long 2196380210
+ .long 1011413563
+ .long 3366293073
+ .long 1071733400
+ .long 3119426314
+ .long 1014120554
+ .long 2471440686
+ .long 1071730325
+ .long 968836267
+ .long 3162214888
+ .long 2930322912
+ .long 1071727258
+ .long 2599499422
+ .long 3162714047
+ .long 351405227
+ .long 1071724200
+ .long 3125337328
+ .long 3159822479
+ .long 3228316108
+ .long 1071721149
+ .long 3010241991
+ .long 3158422804
+ .long 2875075254
+ .long 1071718107
+ .long 4144233330
+ .long 3163333716
+ .long 3490863953
+ .long 1071715073
+ .long 960797498
+ .long 3162948880
+ .long 685187902
+ .long 1071712048
+ .long 378731989
+ .long 1014843115
+ .long 2952712987
+ .long 1071709030
+ .long 3293494651
+ .long 3160120301
+ .long 1608493509
+ .long 1071706021
+ .long 3159622171
+ .long 3162807737
+ .long 852742562
+ .long 1071703020
+ .long 667253586
+ .long 1009793559
+ .long 590962156
+ .long 1071700027
+ .long 3829346666
+ .long 3163275597
+ .long 728909815
+ .long 1071697042
+ .long 383930225
+ .long 1015029468
+ .long 1172597893
+ .long 1071694065
+ .long 114433263
+ .long 1015347593
+ .long 1828292879
+ .long 1071691096
+ .long 1255956747
+ .long 1015588398
+ .long 2602514713
+ .long 1071688135
+ .long 2268929336
+ .long 1014354284
+ .long 3402036099
+ .long 1071685182
+ .long 405889334
+ .long 1015105656
+ .long 4133881824
+ .long 1071682237
+ .long 2148155345
+ .long 3162931299
+ .long 410360776
+ .long 1071679301
+ .long 1269990655
+ .long 1011975870
+ .long 728934454
+ .long 1071676372
+ .long 1413842688
+ .long 1014178612
+ .long 702412510
+ .long 1071673451
+ .long 3803266087
+ .long 3162280415
+ .long 238821257
+ .long 1071670538
+ .long 1469694871
+ .long 3162884987
+ .long 3541402996
+ .long 1071667632
+ .long 2759177317
+ .long 1014854626
+ .long 1928746161
+ .long 1071664735
+ .long 983617676
+ .long 1014285177
+ .long 3899555717
+ .long 1071661845
+ .long 427280750
+ .long 3162546972
+ .long 772914124
+ .long 1071658964
+ .long 4004372762
+ .long 1012230161
+ .long 1048019041
+ .long 1071656090
+ .long 1398474845
+ .long 3160510595
+ .long 339411585
+ .long 1071653224
+ .long 264588982
+ .long 3161636657
+ .long 2851812149
+ .long 1071650365
+ .long 2595802551
+ .long 1015767337
+ .long 4200250559
+ .long 1071647514
+ .long 2808127345
+ .long 3161781938
+ .type T2_neg_f,@object
+ .size T2_neg_f,4096
+ .space 512, 0x00 # pad
+ .align 16
+MASK3:
+ .long 0
+ .long 4294967280
+ .long 0
+ .long 4294967280
+ .type MASK3,@object
+ .size MASK3,16
+ .align 16
+RMASK:
+ .long 4294705152
+ .long 4294967295
+ .long 4294705152
+ .long 4294967295
+ .type RMASK,@object
+ .size RMASK,16
+ .align 16
+pv:
+ .long 236289503
+ .long 1064135997
+ .long 463583772
+ .long 3215696314
+ .long 1441186365
+ .long 3212977891
+ .long 286331153
+ .long 1069617425
+ .long 2284589306
+ .long 1066820852
+ .long 1431655765
+ .long 3218429269
+ .type pv,@object
+ .size pv,48
+ .align 4
+HALFMASK:
+ .long 4160749568
+ .long 2147483647
+ .type HALFMASK,@object
+ .size HALFMASK,8
+ .align 4
+ONEMASK:
+ .long 0
+ .long 1072693248
+ .type ONEMASK,@object
+ .size ONEMASK,8
+ .align 4
+TWOMASK:
+ .long 0
+ .long 1073741824
+ .type TWOMASK,@object
+ .size TWOMASK,8
+ .data
+ .section .note.GNU-stack, ""
+// -- Begin DWARF2 SEGMENT .eh_frame
+ .section .eh_frame,"a",@progbits
+.eh_frame_seg:
+ .align 1
+ .4byte 0x00000014
+ .8byte 0x00527a0100000000
+ .8byte 0x08070c1b01107801
+ .4byte 0x00000190
+ .4byte 0x0000001c
+ .4byte 0x0000001c
+ .4byte ..___tag_value_tanh.1-.
+ .4byte ..___tag_value_tanh.5-..___tag_value_tanh.1
+ .2byte 0x0400
+ .4byte ..___tag_value_tanh.3-..___tag_value_tanh.1
+ .2byte 0x100e
+ .byte 0x04
+ .4byte ..___tag_value_tanh.4-..___tag_value_tanh.3
+ .2byte 0x080e
+ .byte 0x00
+# End
diff --git a/libm/x86_64/sqrt.S b/libm/x86_64/sqrt.S
new file mode 100644
index 0000000..ee97026
--- /dev/null
+++ b/libm/x86_64/sqrt.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(sqrt)
+sqrtsd %xmm0,%xmm0
+retq
+END(sqrt)
diff --git a/libm/x86_64/sqrtf.S b/libm/x86_64/sqrtf.S
new file mode 100644
index 0000000..910407f
--- /dev/null
+++ b/libm/x86_64/sqrtf.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(sqrtf)
+sqrtss %xmm0,%xmm0
+retq
+END(sqrtf)
diff --git a/libm/x86_64/trunc.S b/libm/x86_64/trunc.S
new file mode 100644
index 0000000..fe18b40
--- /dev/null
+++ b/libm/x86_64/trunc.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(trunc)
+roundsd $0x3,%xmm0,%xmm0
+retq
+END(trunc)
diff --git a/libm/x86_64/truncf.S b/libm/x86_64/truncf.S
new file mode 100644
index 0000000..eeee1d7
--- /dev/null
+++ b/libm/x86_64/truncf.S
@@ -0,0 +1,36 @@
+/*
+Copyright (c) 2014, Intel Corporation
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+
+ * Neither the name of Intel Corporation nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <private/bionic_asm.h>
+
+ENTRY(truncf)
+roundss $0x3,%xmm0,%xmm0
+retq
+END(truncf)
diff --git a/linker/Android.mk b/linker/Android.mk
index 54535fc..f78a025 100644
--- a/linker/Android.mk
+++ b/linker/Android.mk
@@ -7,8 +7,10 @@
dlfcn.cpp \
linker.cpp \
linker_allocator.cpp \
+ linker_block_allocator.cpp \
linker_environ.cpp \
linker_libc_support.c \
+ linker_memory.cpp \
linker_phdr.cpp \
rt.cpp \
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 5d2425f..18f8cdc 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -50,11 +50,13 @@
#include "private/UniquePtr.h"
#include "linker.h"
+#include "linker_block_allocator.h"
#include "linker_debug.h"
#include "linker_environ.h"
+#include "linker_leb128.h"
#include "linker_phdr.h"
#include "linker_relocs.h"
-#include "linker_allocator.h"
+#include "linker_reloc_iterators.h"
/* >>> IMPORTANT NOTE - READ ME BEFORE MODIFYING <<<
*
@@ -90,8 +92,8 @@
static ElfW(Addr) get_elf_exec_load_bias(const ElfW(Ehdr)* elf);
-static LinkerAllocator<soinfo> g_soinfo_allocator;
-static LinkerAllocator<LinkedListEntry<soinfo>> g_soinfo_links_allocator;
+static LinkerTypeAllocator<soinfo> g_soinfo_allocator;
+static LinkerTypeAllocator<LinkedListEntry<soinfo>> g_soinfo_links_allocator;
static soinfo* solist;
static soinfo* sonext;
@@ -145,18 +147,6 @@
uint32_t bitmask[4096];
#endif
-// You shouldn't try to call memory-allocating functions in the dynamic linker.
-// Guard against the most obvious ones.
-#define DISALLOW_ALLOCATION(return_type, name, ...) \
- return_type name __VA_ARGS__ \
- { \
- __libc_fatal("ERROR: " #name " called from the dynamic linker!\n"); \
- }
-DISALLOW_ALLOCATION(void*, malloc, (size_t u __unused));
-DISALLOW_ALLOCATION(void, free, (void* u __unused));
-DISALLOW_ALLOCATION(void*, realloc, (void* u1 __unused, size_t u2 __unused));
-DISALLOW_ALLOCATION(void*, calloc, (size_t u1 __unused, size_t u2 __unused));
-
static char __linker_dl_err_buf[768];
char* linker_get_error_buffer() {
@@ -419,26 +409,41 @@
uint32_t word_num = (hash / bloom_mask_bits) & gnu_maskwords_;
ElfW(Addr) bloom_word = gnu_bloom_filter_[word_num];
+ TRACE_TYPE(LOOKUP, "SEARCH %s in %s@%p (gnu)",
+ symbol_name.get_name(), name, reinterpret_cast<void*>(base));
+
// test against bloom filter
if ((1 & (bloom_word >> (hash % bloom_mask_bits)) & (bloom_word >> (h2 % bloom_mask_bits))) == 0) {
+ TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
+ symbol_name.get_name(), name, reinterpret_cast<void*>(base));
+
return nullptr;
}
// bloom test says "probably yes"...
- uint32_t n = bucket_[hash % nbucket_];
+ uint32_t n = gnu_bucket_[hash % gnu_nbucket_];
if (n == 0) {
+ TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
+ symbol_name.get_name(), name, reinterpret_cast<void*>(base));
+
return nullptr;
}
do {
ElfW(Sym)* s = symtab_ + n;
- if (((chain_[n] ^ hash) >> 1) == 0 &&
+ if (((gnu_chain_[n] ^ hash) >> 1) == 0 &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
+ TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
+ symbol_name.get_name(), name, reinterpret_cast<void*>(s->st_value),
+ static_cast<size_t>(s->st_size));
return s;
}
- } while ((chain_[n++] & 1) == 0);
+ } while ((gnu_chain_[n++] & 1) == 0);
+
+ TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p",
+ symbol_name.get_name(), name, reinterpret_cast<void*>(base));
return nullptr;
}
@@ -800,8 +805,8 @@
ElfW(Sym)* soinfo::gnu_addr_lookup(const void* addr) {
ElfW(Addr) soaddr = reinterpret_cast<ElfW(Addr)>(addr) - load_bias;
- for (size_t i = 0; i < nbucket_; ++i) {
- uint32_t n = bucket_[i];
+ for (size_t i = 0; i < gnu_nbucket_; ++i) {
+ uint32_t n = gnu_bucket_[i];
if (n == 0) {
continue;
@@ -812,7 +817,7 @@
if (symbol_matches_soaddr(sym, soaddr)) {
return sym;
}
- } while ((chain_[n++] & 1) == 0);
+ } while ((gnu_chain_[n++] & 1) == 0);
}
return nullptr;
@@ -1239,9 +1244,7 @@
}
void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path) {
- if (!get_AT_SECURE()) {
- parse_LD_LIBRARY_PATH(ld_library_path);
- }
+ parse_LD_LIBRARY_PATH(ld_library_path);
}
soinfo* do_dlopen(const char* name, int flags, const android_dlextinfo* extinfo) {
@@ -1297,9 +1300,14 @@
}
#endif
-template<typename ElfRelT>
-bool soinfo::relocate(ElfRelT* rel, unsigned count, const soinfo_list_t& global_group, const soinfo_list_t& local_group) {
- for (size_t idx = 0; idx < count; ++idx, ++rel) {
+template<typename ElfRelIteratorT>
+bool soinfo::relocate(ElfRelIteratorT&& rel_iterator, const soinfo_list_t& global_group, const soinfo_list_t& local_group) {
+ for (size_t idx = 0; rel_iterator.has_next(); ++idx) {
+ const auto rel = rel_iterator.next();
+ if (rel == nullptr) {
+ return false;
+ }
+
ElfW(Word) type = ELFW(R_TYPE)(rel->r_info);
ElfW(Word) sym = ELFW(R_SYM)(rel->r_info);
@@ -1405,16 +1413,16 @@
MARK(rel->r_offset);
TRACE_TYPE(RELO, "RELO RELATIVE %16p <- %16p\n",
reinterpret_cast<void*>(reloc),
- reinterpret_cast<void*>(base + addend));
- *reinterpret_cast<ElfW(Addr)*>(reloc) = (base + addend);
+ reinterpret_cast<void*>(load_bias + addend));
+ *reinterpret_cast<ElfW(Addr)*>(reloc) = (load_bias + addend);
break;
case R_GENERIC_IRELATIVE:
count_relocation(kRelocRelative);
MARK(rel->r_offset);
TRACE_TYPE(RELO, "RELO IRELATIVE %16p <- %16p\n",
reinterpret_cast<void*>(reloc),
- reinterpret_cast<void*>(base + addend));
- *reinterpret_cast<ElfW(Addr)*>(reloc) = call_ifunc_resolver(base + addend);
+ reinterpret_cast<void*>(load_bias + addend));
+ *reinterpret_cast<ElfW(Addr)*>(reloc) = call_ifunc_resolver(load_bias + addend);
break;
#if defined(__aarch64__)
@@ -1936,11 +1944,6 @@
break;
case DT_HASH:
- if (nbucket_ != 0) {
- // in case of --hash-style=both, we prefer gnu
- break;
- }
-
nbucket_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[0];
nchain_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[1];
bucket_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr + 8);
@@ -1948,20 +1951,15 @@
break;
case DT_GNU_HASH:
- if (nbucket_ != 0) {
- // in case of --hash-style=both, we prefer gnu
- nchain_ = 0;
- }
-
- nbucket_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[0];
+ gnu_nbucket_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[0];
// skip symndx
gnu_maskwords_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[2];
gnu_shift2_ = reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[3];
gnu_bloom_filter_ = reinterpret_cast<ElfW(Addr)*>(load_bias + d->d_un.d_ptr + 16);
- bucket_ = reinterpret_cast<uint32_t*>(gnu_bloom_filter_ + gnu_maskwords_);
+ gnu_bucket_ = reinterpret_cast<uint32_t*>(gnu_bloom_filter_ + gnu_maskwords_);
// amend chain for symndx = header[1]
- chain_ = bucket_ + nbucket_ - reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[1];
+ gnu_chain_ = gnu_bucket_ + gnu_nbucket_ - reinterpret_cast<uint32_t*>(load_bias + d->d_un.d_ptr)[1];
if (!powerof2(gnu_maskwords_)) {
DL_ERR("invalid maskwords for gnu_hash = 0x%x, in \"%s\" expecting power to two", gnu_maskwords_, name);
@@ -2051,6 +2049,22 @@
rela_count_ = d->d_un.d_val / sizeof(ElfW(Rela));
break;
+ case DT_ANDROID_RELA:
+ android_relocs_ = reinterpret_cast<uint8_t*>(load_bias + d->d_un.d_ptr);
+ break;
+
+ case DT_ANDROID_RELASZ:
+ android_relocs_size_ = d->d_un.d_val;
+ break;
+
+ case DT_ANDROID_REL:
+ DL_ERR("unsupported DT_ANDROID_REL in \"%s\"", name);
+ return false;
+
+ case DT_ANDROID_RELSZ:
+ DL_ERR("unsupported DT_ANDROID_RELSZ in \"%s\"", name);
+ return false;
+
case DT_RELAENT:
if (d->d_un.d_val != sizeof(ElfW(Rela))) {
DL_ERR("invalid DT_RELAENT: %zd", static_cast<size_t>(d->d_un.d_val));
@@ -2069,6 +2083,7 @@
case DT_RELSZ:
DL_ERR("unsupported DT_RELSZ in \"%s\"", name);
return false;
+
#else
case DT_REL:
rel_ = reinterpret_cast<ElfW(Rel)*>(load_bias + d->d_un.d_ptr);
@@ -2085,6 +2100,22 @@
}
break;
+ case DT_ANDROID_REL:
+ android_relocs_ = reinterpret_cast<uint8_t*>(load_bias + d->d_un.d_ptr);
+ break;
+
+ case DT_ANDROID_RELSZ:
+ android_relocs_size_ = d->d_un.d_val;
+ break;
+
+ case DT_ANDROID_RELA:
+ DL_ERR("unsupported DT_ANDROID_RELA in \"%s\"", name);
+ return false;
+
+ case DT_ANDROID_RELASZ:
+ DL_ERR("unsupported DT_ANDROID_RELASZ in \"%s\"", name);
+ return false;
+
// "Indicates that all RELATIVE relocations have been concatenated together,
// and specifies the RELATIVE relocation count."
//
@@ -2092,9 +2123,15 @@
// Not currently used by bionic linker - ignored.
case DT_RELCOUNT:
break;
+
case DT_RELA:
DL_ERR("unsupported DT_RELA in \"%s\"", name);
return false;
+
+ case DT_RELASZ:
+ DL_ERR("unsupported DT_RELASZ in \"%s\"", name);
+ return false;
+
#endif
case DT_INIT:
init_func_ = reinterpret_cast<linker_function_t>(load_bias + d->d_un.d_ptr);
@@ -2234,7 +2271,7 @@
DL_ERR("linker cannot have DT_NEEDED dependencies on other libraries");
return false;
}
- if (nbucket_ == 0) {
+ if (nbucket_ == 0 && gnu_nbucket_ == 0) {
DL_ERR("empty/missing DT_HASH/DT_GNU_HASH in \"%s\" (new hash type from the future?)", name);
return false;
}
@@ -2249,7 +2286,8 @@
return true;
}
-bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t& local_group, const android_dlextinfo* extinfo) {
+bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t& local_group,
+ const android_dlextinfo* extinfo) {
local_group_root_ = local_group.front();
if (local_group_root_ == nullptr) {
@@ -2270,29 +2308,63 @@
}
#endif
+ if (android_relocs_ != nullptr) {
+ // check signature
+ if (android_relocs_size_ > 3 &&
+ android_relocs_[0] == 'A' &&
+ android_relocs_[1] == 'P' &&
+ (android_relocs_[2] == 'U' || android_relocs_[2] == 'S') &&
+ android_relocs_[3] == '2') {
+ DEBUG("[ android relocating %s ]", name);
+
+ bool relocated = false;
+ const uint8_t* packed_relocs = android_relocs_ + 4;
+ const size_t packed_relocs_size = android_relocs_size_ - 4;
+
+ if (android_relocs_[2] == 'U') {
+ relocated = relocate(
+ packed_reloc_iterator<leb128_decoder>(
+ leb128_decoder(packed_relocs, packed_relocs_size)),
+ global_group, local_group);
+ } else { // android_relocs_[2] == 'S'
+ relocated = relocate(
+ packed_reloc_iterator<sleb128_decoder>(
+ sleb128_decoder(packed_relocs, packed_relocs_size)),
+ global_group, local_group);
+ }
+
+ if (!relocated) {
+ return false;
+ }
+ } else {
+ DL_ERR("bad android relocation header.");
+ return false;
+ }
+ }
+
#if defined(USE_RELA)
if (rela_ != nullptr) {
DEBUG("[ relocating %s ]", name);
- if (!relocate(rela_, rela_count_, global_group, local_group)) {
+ if (!relocate(plain_reloc_iterator(rela_, rela_count_), global_group, local_group)) {
return false;
}
}
if (plt_rela_ != nullptr) {
DEBUG("[ relocating %s plt ]", name);
- if (!relocate(plt_rela_, plt_rela_count_, global_group, local_group)) {
+ if (!relocate(plain_reloc_iterator(plt_rela_, plt_rela_count_), global_group, local_group)) {
return false;
}
}
#else
if (rel_ != nullptr) {
DEBUG("[ relocating %s ]", name);
- if (!relocate(rel_, rel_count_, global_group, local_group)) {
+ if (!relocate(plain_reloc_iterator(rel_, rel_count_), global_group, local_group)) {
return false;
}
}
if (plt_rel_ != nullptr) {
DEBUG("[ relocating %s plt ]", name);
- if (!relocate(plt_rel_, plt_rel_count_, global_group, local_group)) {
+ if (!relocate(plain_reloc_iterator(plt_rel_, plt_rel_count_), global_group, local_group)) {
return false;
}
}
diff --git a/linker/linker.h b/linker/linker.h
index 2afbaf6..e4681eb 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -286,8 +286,8 @@
void call_array(const char* array_name, linker_function_t* functions, size_t count, bool reverse);
void call_function(const char* function_name, linker_function_t function);
- template<typename ElfRelT>
- bool relocate(ElfRelT* rel, unsigned count, const soinfo_list_t& global_group, const soinfo_list_t& local_group);
+ template<typename ElfRelIteratorT>
+ bool relocate(ElfRelIteratorT&& rel_iterator, const soinfo_list_t& global_group, const soinfo_list_t& local_group);
private:
// This part of the structure is only available
@@ -309,12 +309,19 @@
size_t strtab_size_;
// version >= 2
+
+ size_t gnu_nbucket_;
+ uint32_t* gnu_bucket_;
+ uint32_t* gnu_chain_;
uint32_t gnu_maskwords_;
uint32_t gnu_shift2_;
ElfW(Addr)* gnu_bloom_filter_;
soinfo* local_group_root_;
+ uint8_t* android_relocs_;
+ size_t android_relocs_size_;
+
friend soinfo* get_libdl_info();
};
diff --git a/linker/linker_allocator.cpp b/linker/linker_allocator.cpp
index ac11b97..1b16cf1 100644
--- a/linker/linker_allocator.cpp
+++ b/linker/linker_allocator.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,120 +15,332 @@
*/
#include "linker_allocator.h"
-#include <inttypes.h>
-#include <string.h>
+#include "linker.h"
+
+#include <algorithm>
+#include <vector>
+
+#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include "private/bionic_prctl.h"
-struct LinkerAllocatorPage {
- LinkerAllocatorPage* next;
- uint8_t bytes[PAGE_SIZE-sizeof(LinkerAllocatorPage*)];
-};
+//
+// LinkerMemeoryAllocator is general purpose allocator
+// designed to provide the same functionality as the malloc/free/realloc
+// libc functions.
+//
+// On alloc:
+// If size is >= 1k allocator proxies malloc call directly to mmap
+// If size < 1k allocator uses SmallObjectAllocator for the size
+// rounded up to the nearest power of two.
+//
+// On free:
+//
+// For a pointer allocated using proxy-to-mmap allocator unmaps
+// the memory.
+//
+// For a pointer allocated using SmallObjectAllocator it adds
+// the block to free_blocks_list_. If the number of free pages reaches 2,
+// SmallObjectAllocator munmaps one of the pages keeping the other one
+// in reserve.
-struct FreeBlockInfo {
- void* next_block;
- size_t num_free_blocks;
-};
+static const char kSignature[4] = {'L', 'M', 'A', 1};
-LinkerBlockAllocator::LinkerBlockAllocator(size_t block_size)
- : block_size_(block_size < sizeof(FreeBlockInfo) ? sizeof(FreeBlockInfo) : block_size),
- page_list_(nullptr),
- free_block_list_(nullptr)
-{}
+static const size_t kSmallObjectMaxSize = 1 << kSmallObjectMaxSizeLog2;
-void* LinkerBlockAllocator::alloc() {
- if (free_block_list_ == nullptr) {
- create_new_page();
- }
+// This type is used for large allocations (with size >1k)
+static const uint32_t kLargeObject = 111;
- FreeBlockInfo* block_info = reinterpret_cast<FreeBlockInfo*>(free_block_list_);
- if (block_info->num_free_blocks > 1) {
- FreeBlockInfo* next_block_info = reinterpret_cast<FreeBlockInfo*>(
- reinterpret_cast<char*>(free_block_list_) + block_size_);
- next_block_info->next_block = block_info->next_block;
- next_block_info->num_free_blocks = block_info->num_free_blocks - 1;
- free_block_list_ = next_block_info;
- } else {
- free_block_list_ = block_info->next_block;
- }
-
- memset(block_info, 0, block_size_);
-
- return block_info;
+bool operator<(const small_object_page_record& one, const small_object_page_record& two) {
+ return one.page_addr < two.page_addr;
}
-void LinkerBlockAllocator::free(void* block) {
- if (block == nullptr) {
+static inline uint16_t log2(size_t number) {
+ uint16_t result = 0;
+ number--;
+
+ while (number != 0) {
+ result++;
+ number >>= 1;
+ }
+
+ return result;
+}
+
+LinkerSmallObjectAllocator::LinkerSmallObjectAllocator()
+ : type_(0), name_(nullptr), block_size_(0), free_pages_cnt_(0), free_blocks_list_(nullptr) {}
+
+void* LinkerSmallObjectAllocator::alloc() {
+ if (free_blocks_list_ == nullptr) {
+ alloc_page();
+ }
+
+ small_object_block_record* block_record = free_blocks_list_;
+ if (block_record->free_blocks_cnt > 1) {
+ small_object_block_record* next_free = reinterpret_cast<small_object_block_record*>(
+ reinterpret_cast<uint8_t*>(block_record) + block_size_);
+ next_free->next = block_record->next;
+ next_free->free_blocks_cnt = block_record->free_blocks_cnt - 1;
+ free_blocks_list_ = next_free;
+ } else {
+ free_blocks_list_ = block_record->next;
+ }
+
+ // bookkeeping...
+ auto page_record = find_page_record(block_record);
+
+ if (page_record->allocated_blocks_cnt == 0) {
+ free_pages_cnt_--;
+ }
+
+ page_record->free_blocks_cnt--;
+ page_record->allocated_blocks_cnt++;
+
+ memset(block_record, 0, block_size_);
+
+ return block_record;
+}
+
+void LinkerSmallObjectAllocator::free_page(linker_vector_t::iterator page_record) {
+ void* page_start = reinterpret_cast<void*>(page_record->page_addr);
+ void* page_end = reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(page_start) + PAGE_SIZE);
+
+ while (free_blocks_list_ != nullptr &&
+ free_blocks_list_ > page_start &&
+ free_blocks_list_ < page_end) {
+ free_blocks_list_ = free_blocks_list_->next;
+ }
+
+ small_object_block_record* current = free_blocks_list_;
+
+ while (current != nullptr) {
+ while (current->next > page_start && current->next < page_end) {
+ current->next = current->next->next;
+ }
+
+ current = current->next;
+ }
+
+ munmap(page_start, PAGE_SIZE);
+ page_records_.erase(page_record);
+ free_pages_cnt_--;
+}
+
+void LinkerSmallObjectAllocator::free(void* ptr) {
+ auto page_record = find_page_record(ptr);
+
+ ssize_t offset = reinterpret_cast<uintptr_t>(ptr) - sizeof(page_info);
+
+ if (offset % block_size_ != 0) {
+ __libc_fatal("invalid pointer: %p (block_size=%zd)", ptr, block_size_);
+ }
+
+ memset(ptr, 0, block_size_);
+ small_object_block_record* block_record = reinterpret_cast<small_object_block_record*>(ptr);
+
+ block_record->next = free_blocks_list_;
+ block_record->free_blocks_cnt = 1;
+
+ free_blocks_list_ = block_record;
+
+ page_record->free_blocks_cnt++;
+ page_record->allocated_blocks_cnt--;
+
+ if (page_record->allocated_blocks_cnt == 0) {
+ if (free_pages_cnt_++ > 1) {
+ // if we already have a free page - unmap this one.
+ free_page(page_record);
+ }
+ }
+}
+
+void LinkerSmallObjectAllocator::init(uint32_t type, size_t block_size, const char* name) {
+ type_ = type;
+ block_size_ = block_size;
+ name_ = name;
+}
+
+linker_vector_t::iterator LinkerSmallObjectAllocator::find_page_record(void* ptr) {
+ void* addr = reinterpret_cast<void*>(PAGE_START(reinterpret_cast<uintptr_t>(ptr)));
+ small_object_page_record boundary;
+ boundary.page_addr = addr;
+ linker_vector_t::iterator it = std::lower_bound(
+ page_records_.begin(), page_records_.end(), boundary);
+
+ if (it == page_records_.end() || it->page_addr != addr) {
+ // not found...
+ __libc_fatal("page record for %p was not found (block_size=%zd)", ptr, block_size_);
+ }
+
+ return it;
+}
+
+void LinkerSmallObjectAllocator::create_page_record(void* page_addr, size_t free_blocks_cnt) {
+ small_object_page_record record;
+ record.page_addr = page_addr;
+ record.free_blocks_cnt = free_blocks_cnt;
+ record.allocated_blocks_cnt = 0;
+
+ linker_vector_t::iterator it = std::lower_bound(
+ page_records_.begin(), page_records_.end(), record);
+ page_records_.insert(it, record);
+}
+
+void LinkerSmallObjectAllocator::alloc_page() {
+ void* map_ptr = mmap(nullptr, PAGE_SIZE,
+ PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+ if (map_ptr == MAP_FAILED) {
+ __libc_fatal("mmap failed");
+ }
+
+ prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, PAGE_SIZE, name_);
+
+ memset(map_ptr, 0, PAGE_SIZE);
+
+ page_info* info = reinterpret_cast<page_info*>(map_ptr);
+ memcpy(info->signature, kSignature, sizeof(kSignature));
+ info->type = type_;
+ info->allocator_addr = this;
+
+ size_t free_blocks_cnt = (PAGE_SIZE - sizeof(page_info))/block_size_;
+
+ create_page_record(map_ptr, free_blocks_cnt);
+
+ small_object_block_record* first_block = reinterpret_cast<small_object_block_record*>(info + 1);
+
+ first_block->next = free_blocks_list_;
+ first_block->free_blocks_cnt = free_blocks_cnt;
+
+ free_blocks_list_ = first_block;
+}
+
+
+LinkerMemoryAllocator::LinkerMemoryAllocator() {
+ static const char* allocator_names[kSmallObjectAllocatorsCount] = {
+ "linker_alloc_16", // 2^4
+ "linker_alloc_32", // 2^5
+ "linker_alloc_64", // and so on...
+ "linker_alloc_128",
+ "linker_alloc_256",
+ "linker_alloc_512",
+ "linker_alloc_1024", // 2^10
+ };
+
+ for (size_t i = 0; i < kSmallObjectAllocatorsCount; ++i) {
+ uint32_t type = i + kSmallObjectMinSizeLog2;
+ allocators_[i].init(type, 1 << type, allocator_names[i]);
+ }
+}
+
+void* LinkerMemoryAllocator::alloc_mmap(size_t size) {
+ size_t allocated_size = PAGE_END(size + sizeof(page_info));
+ void* map_ptr = mmap(nullptr, allocated_size,
+ PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+
+ if (map_ptr == MAP_FAILED) {
+ __libc_fatal("mmap failed");
+ }
+
+ prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, map_ptr, allocated_size, "linker_alloc_lob");
+
+ memset(map_ptr, 0, allocated_size);
+
+ page_info* info = reinterpret_cast<page_info*>(map_ptr);
+ memcpy(info->signature, kSignature, sizeof(kSignature));
+ info->type = kLargeObject;
+ info->allocated_size = allocated_size;
+
+ return info + 1;
+}
+
+void* LinkerMemoryAllocator::alloc(size_t size) {
+ // treat alloc(0) as alloc(1)
+ if (size == 0) {
+ size = 1;
+ }
+
+ if (size > kSmallObjectMaxSize) {
+ return alloc_mmap(size);
+ }
+
+ uint16_t log2_size = log2(size);
+
+ if (log2_size < kSmallObjectMinSizeLog2) {
+ log2_size = kSmallObjectMinSizeLog2;
+ }
+
+ return get_small_object_allocator(log2_size)->alloc();
+}
+
+page_info* LinkerMemoryAllocator::get_page_info(void* ptr) {
+ page_info* info = reinterpret_cast<page_info*>(PAGE_START(reinterpret_cast<size_t>(ptr)));
+ if (memcmp(info->signature, kSignature, sizeof(kSignature)) != 0) {
+ __libc_fatal("invalid pointer %p (page signature mismatch)", ptr);
+ }
+
+ return info;
+}
+
+void* LinkerMemoryAllocator::realloc(void* ptr, size_t size) {
+ if (ptr == nullptr) {
+ return alloc(size);
+ }
+
+ if (size == 0) {
+ free(ptr);
+ return nullptr;
+ }
+
+ page_info* info = get_page_info(ptr);
+
+ size_t old_size = 0;
+
+ if (info->type == kLargeObject) {
+ old_size = info->allocated_size - sizeof(page_info);
+ } else {
+ LinkerSmallObjectAllocator* allocator = get_small_object_allocator(info->type);
+ if (allocator != info->allocator_addr) {
+ __libc_fatal("invalid pointer %p (page signature mismatch)", ptr);
+ }
+
+ old_size = allocator->get_block_size();
+ }
+
+ if (old_size < size) {
+ void *result = alloc(size);
+ memcpy(result, ptr, old_size);
+ free(ptr);
+ return result;
+ }
+
+ return ptr;
+}
+
+void LinkerMemoryAllocator::free(void* ptr) {
+ if (ptr == nullptr) {
return;
}
- LinkerAllocatorPage* page = find_page(block);
+ page_info* info = get_page_info(ptr);
- if (page == nullptr) {
- abort();
- }
-
- ssize_t offset = reinterpret_cast<uint8_t*>(block) - page->bytes;
-
- if (offset % block_size_ != 0) {
- abort();
- }
-
- memset(block, 0, block_size_);
-
- FreeBlockInfo* block_info = reinterpret_cast<FreeBlockInfo*>(block);
-
- block_info->next_block = free_block_list_;
- block_info->num_free_blocks = 1;
-
- free_block_list_ = block_info;
-}
-
-void LinkerBlockAllocator::protect_all(int prot) {
- for (LinkerAllocatorPage* page = page_list_; page != nullptr; page = page->next) {
- if (mprotect(page, PAGE_SIZE, prot) == -1) {
- abort();
- }
- }
-}
-
-void LinkerBlockAllocator::create_new_page() {
- LinkerAllocatorPage* page = reinterpret_cast<LinkerAllocatorPage*>(mmap(nullptr, PAGE_SIZE,
- PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0));
- if (page == MAP_FAILED) {
- abort(); // oom
- }
-
- prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, page, PAGE_SIZE, "linker_alloc");
-
- memset(page, 0, PAGE_SIZE);
-
- FreeBlockInfo* first_block = reinterpret_cast<FreeBlockInfo*>(page->bytes);
- first_block->next_block = free_block_list_;
- first_block->num_free_blocks = (PAGE_SIZE - sizeof(LinkerAllocatorPage*))/block_size_;
-
- free_block_list_ = first_block;
-
- page->next = page_list_;
- page_list_ = page;
-}
-
-LinkerAllocatorPage* LinkerBlockAllocator::find_page(void* block) {
- if (block == nullptr) {
- abort();
- }
-
- LinkerAllocatorPage* page = page_list_;
- while (page != nullptr) {
- const uint8_t* page_ptr = reinterpret_cast<const uint8_t*>(page);
- if (block >= (page_ptr + sizeof(page->next)) && block < (page_ptr + PAGE_SIZE)) {
- return page;
+ if (info->type == kLargeObject) {
+ munmap(info, info->allocated_size);
+ } else {
+ LinkerSmallObjectAllocator* allocator = get_small_object_allocator(info->type);
+ if (allocator != info->allocator_addr) {
+ __libc_fatal("invalid pointer %p (invalid allocator address for the page)", ptr);
}
- page = page->next;
+ allocator->free(ptr);
+ }
+}
+
+LinkerSmallObjectAllocator* LinkerMemoryAllocator::get_small_object_allocator(uint32_t type) {
+ if (type < kSmallObjectMinSizeLog2 || type > kSmallObjectMaxSizeLog2) {
+ __libc_fatal("invalid type: %u", type);
}
- abort();
+ return &allocators_[type - kSmallObjectMinSizeLog2];
}
diff --git a/linker/linker_allocator.h b/linker/linker_allocator.h
index 5d3563f..2adad56 100644
--- a/linker/linker_allocator.h
+++ b/linker/linker_allocator.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,53 +18,126 @@
#define __LINKER_ALLOCATOR_H
#include <stdlib.h>
-#include <limits.h>
-#include "private/bionic_macros.h"
+#include <sys/cdefs.h>
+#include <sys/mman.h>
+#include <stddef.h>
+#include <unistd.h>
-struct LinkerAllocatorPage;
+#include <vector>
-/*
- * This class is a non-template version of the LinkerAllocator
- * It keeps code inside .cpp file by keeping the interface
- * template-free.
- *
- * Please use LinkerAllocator<type> where possible (everywhere).
- */
-class LinkerBlockAllocator {
+#include "private/bionic_prctl.h"
+#include "private/libc_logging.h"
+
+const uint32_t kSmallObjectMaxSizeLog2 = 10;
+const uint32_t kSmallObjectMinSizeLog2 = 4;
+const uint32_t kSmallObjectAllocatorsCount = kSmallObjectMaxSizeLog2 - kSmallObjectMinSizeLog2 + 1;
+
+class LinkerSmallObjectAllocator;
+
+// This structure is placed at the beginning of each addressable page
+// and has all information we need to find the corresponding memory allocator.
+struct page_info {
+ char signature[4];
+ uint32_t type;
+ union {
+ // we use allocated_size for large objects allocator
+ size_t allocated_size;
+ // and allocator_addr for small ones.
+ LinkerSmallObjectAllocator* allocator_addr;
+ };
+};
+
+struct small_object_page_record {
+ void* page_addr;
+ size_t free_blocks_cnt;
+ size_t allocated_blocks_cnt;
+};
+
+// for lower_bound...
+bool operator<(const small_object_page_record& one, const small_object_page_record& two);
+
+struct small_object_block_record {
+ small_object_block_record* next;
+ size_t free_blocks_cnt;
+};
+
+// This is implementation for std::vector allocator
+template <typename T>
+class linker_vector_allocator {
public:
- explicit LinkerBlockAllocator(size_t block_size);
+ typedef T value_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef T& reference;
+ typedef const T& const_reference;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ T* allocate(size_t n, const T* hint = nullptr) {
+ size_t size = n * sizeof(T);
+ void* ptr = mmap(const_cast<T*>(hint), size,
+ PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
+ if (ptr == MAP_FAILED) {
+ // Spec says we need to throw std::bad_alloc here but because our
+ // code does not support exception handling anyways - we are going to abort.
+ __libc_fatal("mmap failed");
+ }
+
+ prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, ptr, size, "linker_alloc_vector");
+
+ return reinterpret_cast<T*>(ptr);
+ }
+
+ void deallocate(T* ptr, size_t n) {
+ munmap(ptr, n * sizeof(T));
+ }
+};
+
+typedef
+ std::vector<small_object_page_record, linker_vector_allocator<small_object_page_record>>
+ linker_vector_t;
+
+
+class LinkerSmallObjectAllocator {
+ public:
+ LinkerSmallObjectAllocator();
+ void init(uint32_t type, size_t block_size, const char* name);
void* alloc();
- void free(void* block);
- void protect_all(int prot);
+ void free(void* ptr);
+ size_t get_block_size() const { return block_size_; }
private:
- void create_new_page();
- LinkerAllocatorPage* find_page(void* block);
+ void alloc_page();
+ void free_page(linker_vector_t::iterator page_record);
+ linker_vector_t::iterator find_page_record(void* ptr);
+ void create_page_record(void* page_addr, size_t free_blocks_cnt);
+ uint32_t type_;
+ const char* name_;
size_t block_size_;
- LinkerAllocatorPage* page_list_;
- void* free_block_list_;
- DISALLOW_COPY_AND_ASSIGN(LinkerBlockAllocator);
+ size_t free_pages_cnt_;
+ small_object_block_record* free_blocks_list_;
+
+ // sorted vector of page records
+ linker_vector_t page_records_;
};
-/*
- * We can't use malloc(3) in the dynamic linker.
- *
- * A simple allocator for the dynamic linker. An allocator allocates instances
- * of a single fixed-size type. Allocations are backed by page-sized private
- * anonymous mmaps.
- */
-template<typename T>
-class LinkerAllocator {
+class LinkerMemoryAllocator {
public:
- LinkerAllocator() : block_allocator_(sizeof(T)) {}
- T* alloc() { return reinterpret_cast<T*>(block_allocator_.alloc()); }
- void free(T* t) { block_allocator_.free(t); }
- void protect_all(int prot) { block_allocator_.protect_all(prot); }
+ LinkerMemoryAllocator();
+ void* alloc(size_t size);
+
+ // Note that this implementation of realloc never shrinks allocation
+ void* realloc(void* ptr, size_t size);
+ void free(void* ptr);
private:
- LinkerBlockAllocator block_allocator_;
- DISALLOW_COPY_AND_ASSIGN(LinkerAllocator);
+ void* alloc_mmap(size_t size);
+ page_info* get_page_info(void* ptr);
+ LinkerSmallObjectAllocator* get_small_object_allocator(uint32_t type);
+
+ LinkerSmallObjectAllocator allocators_[kSmallObjectAllocatorsCount];
};
-#endif // __LINKER_ALLOCATOR_H
+
+
+#endif /* __LINKER_ALLOCATOR_H */
diff --git a/linker/linker_block_allocator.cpp b/linker/linker_block_allocator.cpp
new file mode 100644
index 0000000..fc9a75b
--- /dev/null
+++ b/linker/linker_block_allocator.cpp
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "linker_block_allocator.h"
+#include <inttypes.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <unistd.h>
+
+#include "private/bionic_prctl.h"
+
+struct LinkerBlockAllocatorPage {
+ LinkerBlockAllocatorPage* next;
+ uint8_t bytes[PAGE_SIZE-sizeof(LinkerBlockAllocatorPage*)];
+};
+
+struct FreeBlockInfo {
+ void* next_block;
+ size_t num_free_blocks;
+};
+
+LinkerBlockAllocator::LinkerBlockAllocator(size_t block_size)
+ : block_size_(block_size < sizeof(FreeBlockInfo) ? sizeof(FreeBlockInfo) : block_size),
+ page_list_(nullptr),
+ free_block_list_(nullptr)
+{}
+
+void* LinkerBlockAllocator::alloc() {
+ if (free_block_list_ == nullptr) {
+ create_new_page();
+ }
+
+ FreeBlockInfo* block_info = reinterpret_cast<FreeBlockInfo*>(free_block_list_);
+ if (block_info->num_free_blocks > 1) {
+ FreeBlockInfo* next_block_info = reinterpret_cast<FreeBlockInfo*>(
+ reinterpret_cast<char*>(free_block_list_) + block_size_);
+ next_block_info->next_block = block_info->next_block;
+ next_block_info->num_free_blocks = block_info->num_free_blocks - 1;
+ free_block_list_ = next_block_info;
+ } else {
+ free_block_list_ = block_info->next_block;
+ }
+
+ memset(block_info, 0, block_size_);
+
+ return block_info;
+}
+
+void LinkerBlockAllocator::free(void* block) {
+ if (block == nullptr) {
+ return;
+ }
+
+ LinkerBlockAllocatorPage* page = find_page(block);
+
+ if (page == nullptr) {
+ abort();
+ }
+
+ ssize_t offset = reinterpret_cast<uint8_t*>(block) - page->bytes;
+
+ if (offset % block_size_ != 0) {
+ abort();
+ }
+
+ memset(block, 0, block_size_);
+
+ FreeBlockInfo* block_info = reinterpret_cast<FreeBlockInfo*>(block);
+
+ block_info->next_block = free_block_list_;
+ block_info->num_free_blocks = 1;
+
+ free_block_list_ = block_info;
+}
+
+void LinkerBlockAllocator::protect_all(int prot) {
+ for (LinkerBlockAllocatorPage* page = page_list_; page != nullptr; page = page->next) {
+ if (mprotect(page, PAGE_SIZE, prot) == -1) {
+ abort();
+ }
+ }
+}
+
+void LinkerBlockAllocator::create_new_page() {
+ LinkerBlockAllocatorPage* page = reinterpret_cast<LinkerBlockAllocatorPage*>(
+ mmap(nullptr, PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0));
+
+ if (page == MAP_FAILED) {
+ abort(); // oom
+ }
+
+ prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, page, PAGE_SIZE, "linker_alloc");
+
+ memset(page, 0, PAGE_SIZE);
+
+ FreeBlockInfo* first_block = reinterpret_cast<FreeBlockInfo*>(page->bytes);
+ first_block->next_block = free_block_list_;
+ first_block->num_free_blocks = (PAGE_SIZE - sizeof(LinkerBlockAllocatorPage*))/block_size_;
+
+ free_block_list_ = first_block;
+
+ page->next = page_list_;
+ page_list_ = page;
+}
+
+LinkerBlockAllocatorPage* LinkerBlockAllocator::find_page(void* block) {
+ if (block == nullptr) {
+ abort();
+ }
+
+ LinkerBlockAllocatorPage* page = page_list_;
+ while (page != nullptr) {
+ const uint8_t* page_ptr = reinterpret_cast<const uint8_t*>(page);
+ if (block >= (page_ptr + sizeof(page->next)) && block < (page_ptr + PAGE_SIZE)) {
+ return page;
+ }
+
+ page = page->next;
+ }
+
+ abort();
+}
diff --git a/linker/linker_block_allocator.h b/linker/linker_block_allocator.h
new file mode 100644
index 0000000..4b9b995
--- /dev/null
+++ b/linker/linker_block_allocator.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LINKER_BLOCK_ALLOCATOR_H
+#define __LINKER_BLOCK_ALLOCATOR_H
+
+#include <stdlib.h>
+#include <limits.h>
+#include "private/bionic_macros.h"
+
+struct LinkerBlockAllocatorPage;
+
+/*
+ * This class is a non-template version of the LinkerTypeAllocator
+ * It keeps code inside .cpp file by keeping the interface
+ * template-free.
+ *
+ * Please use LinkerTypeAllocator<type> where possible (everywhere).
+ */
+class LinkerBlockAllocator {
+ public:
+ explicit LinkerBlockAllocator(size_t block_size);
+
+ void* alloc();
+ void free(void* block);
+ void protect_all(int prot);
+
+ private:
+ void create_new_page();
+ LinkerBlockAllocatorPage* find_page(void* block);
+
+ size_t block_size_;
+ LinkerBlockAllocatorPage* page_list_;
+ void* free_block_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(LinkerBlockAllocator);
+};
+
+/*
+ * A simple allocator for the dynamic linker. An allocator allocates instances
+ * of a single fixed-size type. Allocations are backed by page-sized private
+ * anonymous mmaps.
+ *
+ * The differences between this allocator and LinkerMemoryAllocator are:
+ * 1. This allocator manages space more efficiently. LinkerMemoryAllocator
+ * operates in power-of-two sized blocks up to 1k, when this implementation
+ * splits the page to aligned size of structure; For example for structures
+ * with size 513 this allocator will use 516 (520 for lp64) bytes of data
+ * where generalized implementation is going to use 1024 sized blocks.
+ *
+ * 2. This allocator does not munmap allocated memory, where LinkerMemoryAllocator does.
+ *
+ * 3. This allocator provides mprotect services to the user, where LinkerMemoryAllocator
+ * always treats it's memory as READ|WRITE.
+ */
+template<typename T>
+class LinkerTypeAllocator {
+ public:
+ LinkerTypeAllocator() : block_allocator_(sizeof(T)) {}
+ T* alloc() { return reinterpret_cast<T*>(block_allocator_.alloc()); }
+ void free(T* t) { block_allocator_.free(t); }
+ void protect_all(int prot) { block_allocator_.protect_all(prot); }
+ private:
+ LinkerBlockAllocator block_allocator_;
+ DISALLOW_COPY_AND_ASSIGN(LinkerTypeAllocator);
+};
+
+#endif // __LINKER_BLOCK_ALLOCATOR_H
diff --git a/linker/linker_leb128.h b/linker/linker_leb128.h
new file mode 100644
index 0000000..d5c6488
--- /dev/null
+++ b/linker/linker_leb128.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LINKER_LEB128_H
+#define _LINKER_LEB128_H
+
+#include <stdint.h>
+
+// Helper classes for decoding LEB128, used in packed relocation data.
+// http://en.wikipedia.org/wiki/LEB128
+
+class leb128_decoder {
+ public:
+ leb128_decoder(const uint8_t* buffer, size_t count)
+ : current_(buffer), end_(buffer + count) { }
+
+ size_t pop_front() {
+ size_t value = 0;
+
+ size_t shift = 0;
+ uint8_t byte;
+
+ do {
+ if (current_ >= end_) {
+ __libc_fatal("leb128_decoder ran out of bounds");
+ }
+ byte = *current_++;
+ value |= static_cast<size_t>(byte & 127) << shift;
+ shift += 7;
+ } while (byte & 128);
+
+ return value;
+ }
+
+ private:
+ const uint8_t* current_;
+ const uint8_t* const end_;
+};
+
+class sleb128_decoder {
+ public:
+ sleb128_decoder(const uint8_t* buffer, size_t count)
+ : current_(buffer), end_(buffer+count) { }
+
+ size_t pop_front() {
+ size_t value = 0;
+ static const size_t size = CHAR_BIT * sizeof(value);
+
+ size_t shift = 0;
+ uint8_t byte;
+
+ do {
+ if (current_ >= end_) {
+ __libc_fatal("leb128_decoder ran out of bounds");
+ }
+ byte = *current_++;
+ value |= (static_cast<size_t>(byte & 127) << shift);
+ shift += 7;
+ } while (byte & 128);
+
+ if (shift < size && (byte & 64)) {
+ value |= -(static_cast<size_t>(1) << shift);
+ }
+
+ return value;
+ }
+
+ private:
+ const uint8_t* current_;
+ const uint8_t* const end_;
+};
+
+#endif // __LINKER_LEB128_H
+
diff --git a/linker/linker_memory.cpp b/linker/linker_memory.cpp
new file mode 100644
index 0000000..1892d02
--- /dev/null
+++ b/linker/linker_memory.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "linker_allocator.h"
+
+#include <stdlib.h>
+
+static LinkerMemoryAllocator g_linker_allocator;
+
+void* malloc(size_t byte_count) {
+ return g_linker_allocator.alloc(byte_count);
+}
+
+void* calloc(size_t item_count, size_t item_size) {
+ return g_linker_allocator.alloc(item_count*item_size);
+}
+
+void* realloc(void* p, size_t byte_count) {
+ return g_linker_allocator.realloc(p, byte_count);
+}
+
+void free(void* ptr) {
+ g_linker_allocator.free(ptr);
+}
+
diff --git a/linker/linker_mips.cpp b/linker/linker_mips.cpp
index 7fbde3d..f0bde55 100644
--- a/linker/linker_mips.cpp
+++ b/linker/linker_mips.cpp
@@ -29,10 +29,32 @@
#include "linker.h"
#include "linker_debug.h"
#include "linker_relocs.h"
+#include "linker_reloc_iterators.h"
+#include "linker_leb128.h"
-template<>
-bool soinfo::relocate(ElfW(Rel)* rel, unsigned count, const soinfo_list_t& global_group, const soinfo_list_t& local_group) {
- for (size_t idx = 0; idx < count; ++idx, ++rel) {
+template bool soinfo::relocate<plain_reloc_iterator>(plain_reloc_iterator&& rel_iterator,
+ const soinfo_list_t& global_group,
+ const soinfo_list_t& local_group);
+
+template bool soinfo::relocate<packed_reloc_iterator<sleb128_decoder>>(
+ packed_reloc_iterator<sleb128_decoder>&& rel_iterator,
+ const soinfo_list_t& global_group,
+ const soinfo_list_t& local_group);
+
+template bool soinfo::relocate<packed_reloc_iterator<leb128_decoder>>(
+ packed_reloc_iterator<leb128_decoder>&& rel_iterator,
+ const soinfo_list_t& global_group,
+ const soinfo_list_t& local_group);
+
+template <typename ElfRelIteratorT>
+bool soinfo::relocate(ElfRelIteratorT&& rel_iterator, const soinfo_list_t& global_group, const soinfo_list_t& local_group) {
+ for (size_t idx = 0; rel_iterator.has_next(); ++idx) {
+ const auto rel = rel_iterator.next();
+
+ if (rel == nullptr) {
+ return false;
+ }
+
ElfW(Word) type = ELFW(R_TYPE)(rel->r_info);
ElfW(Word) sym = ELFW(R_SYM)(rel->r_info);
diff --git a/linker/linker_phdr.cpp b/linker/linker_phdr.cpp
index 91a2fb8..38e6262 100644
--- a/linker/linker_phdr.cpp
+++ b/linker/linker_phdr.cpp
@@ -332,7 +332,7 @@
return false;
}
int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS;
- start = mmap(addr, load_size_, PROT_NONE, mmap_flags, -1, 0);
+ start = mmap(nullptr, load_size_, PROT_NONE, mmap_flags, -1, 0);
if (start == MAP_FAILED) {
DL_ERR("couldn't reserve %zd bytes of address space for \"%s\"", load_size_, name_);
return false;
diff --git a/linker/linker_reloc_iterators.h b/linker/linker_reloc_iterators.h
new file mode 100644
index 0000000..5db31f9
--- /dev/null
+++ b/linker/linker_reloc_iterators.h
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LINKER_RELOC_ITERATORS_H
+#define __LINKER_RELOC_ITERATORS_H
+
+#include "linker.h"
+
+#include <string.h>
+
+#define RELOCATION_GROUPED_BY_INFO_FLAG 1
+#define RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG 2
+#define RELOCATION_GROUPED_BY_ADDEND_FLAG 4
+#define RELOCATION_GROUP_HAS_ADDEND_FLAG 8
+
+#define RELOCATION_GROUPED_BY_INFO(flags) (((flags) & RELOCATION_GROUPED_BY_INFO_FLAG) != 0)
+#define RELOCATION_GROUPED_BY_OFFSET_DELTA(flags) (((flags) & RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG) != 0)
+#define RELOCATION_GROUPED_BY_ADDEND(flags) (((flags) & RELOCATION_GROUPED_BY_ADDEND_FLAG) != 0)
+#define RELOCATION_GROUP_HAS_ADDEND(flags) (((flags) & RELOCATION_GROUP_HAS_ADDEND_FLAG) != 0)
+
+class plain_reloc_iterator {
+#if defined(USE_RELA)
+ typedef ElfW(Rela) rel_t;
+#else
+ typedef ElfW(Rel) rel_t;
+#endif
+ public:
+ plain_reloc_iterator(rel_t* rel_array, size_t count)
+ : begin_(rel_array), end_(begin_ + count), current_(begin_) {}
+
+ bool has_next() {
+ return current_ < end_;
+ }
+
+ rel_t* next() {
+ return current_++;
+ }
+ private:
+ rel_t* const begin_;
+ rel_t* const end_;
+ rel_t* current_;
+
+ DISALLOW_COPY_AND_ASSIGN(plain_reloc_iterator);
+};
+
+template <typename decoder_t>
+class packed_reloc_iterator {
+#if defined(USE_RELA)
+ typedef ElfW(Rela) rel_t;
+#else
+ typedef ElfW(Rel) rel_t;
+#endif
+ public:
+ explicit packed_reloc_iterator(decoder_t&& decoder)
+ : decoder_(decoder) {
+ // initialize fields
+ memset(&reloc_, 0, sizeof(reloc_));
+ relocation_count_ = decoder_.pop_front();
+ reloc_.r_offset = decoder_.pop_front();
+ relocation_index_ = 0;
+ relocation_group_index_ = 0;
+ group_size_ = 0;
+ }
+
+ bool has_next() const {
+ return relocation_index_ < relocation_count_;
+ }
+
+ rel_t* next() {
+ if (relocation_group_index_ == group_size_) {
+ if (!read_group_fields()) {
+ // Iterator is inconsistent state; it should not be called again
+ // but in case it is let's make sure has_next() returns false.
+ relocation_index_ = relocation_count_ = 0;
+ return nullptr;
+ }
+ }
+
+ if (RELOCATION_GROUPED_BY_OFFSET_DELTA(group_flags_)) {
+ reloc_.r_offset += group_r_offset_delta_;
+ } else {
+ reloc_.r_offset += decoder_.pop_front();
+ }
+
+ if (!RELOCATION_GROUPED_BY_INFO(group_flags_)) {
+ reloc_.r_info = decoder_.pop_front();
+ }
+
+#if defined(USE_RELA)
+ if (RELOCATION_GROUP_HAS_ADDEND(group_flags_) && !RELOCATION_GROUPED_BY_ADDEND(group_flags_)) {
+ reloc_.r_addend += decoder_.pop_front();
+ }
+#endif
+
+ relocation_index_++;
+ relocation_group_index_++;
+
+ return &reloc_;
+ }
+ private:
+ bool read_group_fields() {
+ group_size_ = decoder_.pop_front();
+ group_flags_ = decoder_.pop_front();
+
+ if (RELOCATION_GROUPED_BY_OFFSET_DELTA(group_flags_)) {
+ group_r_offset_delta_ = decoder_.pop_front();
+ }
+
+ if (RELOCATION_GROUPED_BY_INFO(group_flags_)) {
+ reloc_.r_info = decoder_.pop_front();
+ }
+
+ if (RELOCATION_GROUP_HAS_ADDEND(group_flags_) && RELOCATION_GROUPED_BY_ADDEND(group_flags_)) {
+#if !defined(USE_RELA)
+ // This platform does not support rela, and yet we have it encoded in android_rel section.
+ DL_ERR("unexpected r_addend in android.rel section");
+ return false;
+#else
+ reloc_.r_addend += decoder_.pop_front();
+ } else if (!RELOCATION_GROUP_HAS_ADDEND(group_flags_)) {
+ reloc_.r_addend = 0;
+#endif
+ }
+
+ relocation_group_index_ = 0;
+ return true;
+ }
+
+ decoder_t decoder_;
+ size_t relocation_count_;
+ size_t group_size_;
+ size_t group_flags_;
+ size_t group_r_offset_delta_;
+ size_t relocation_index_;
+ size_t relocation_group_index_;
+ rel_t reloc_;
+};
+
+#endif // __LINKER_RELOC_ITERATORS_H
diff --git a/linker/tests/Android.mk b/linker/tests/Android.mk
index aa9491e..35992c5 100644
--- a/linker/tests/Android.mk
+++ b/linker/tests/Android.mk
@@ -28,7 +28,12 @@
LOCAL_SRC_FILES := \
linked_list_test.cpp \
- linker_allocator_test.cpp \
+ linker_block_allocator_test.cpp \
+ ../linker_block_allocator.cpp \
+ linker_memory_allocator_test.cpp \
../linker_allocator.cpp
+# for __libc_fatal
+LOCAL_SRC_FILES += ../../libc/bionic/libc_logging.cpp
+
include $(BUILD_NATIVE_TEST)
diff --git a/linker/tests/linker_allocator_test.cpp b/linker/tests/linker_block_allocator_test.cpp
similarity index 92%
rename from linker/tests/linker_allocator_test.cpp
rename to linker/tests/linker_block_allocator_test.cpp
index 9292a05..3ef0f36 100644
--- a/linker/tests/linker_allocator_test.cpp
+++ b/linker/tests/linker_block_allocator_test.cpp
@@ -20,7 +20,7 @@
#include <gtest/gtest.h>
-#include "../linker_allocator.h"
+#include "../linker_block_allocator.h"
#include <unistd.h>
@@ -49,7 +49,7 @@
};
TEST(linker_allocator, test_nominal) {
- LinkerAllocator<test_struct_nominal> allocator;
+ LinkerTypeAllocator<test_struct_nominal> allocator;
test_struct_nominal* ptr1 = allocator.alloc();
ASSERT_TRUE(ptr1 != nullptr);
@@ -65,7 +65,7 @@
}
TEST(linker_allocator, test_small) {
- LinkerAllocator<test_struct_small> allocator;
+ LinkerTypeAllocator<test_struct_small> allocator;
char* ptr1 = reinterpret_cast<char*>(allocator.alloc());
char* ptr2 = reinterpret_cast<char*>(allocator.alloc());
@@ -76,7 +76,7 @@
}
TEST(linker_allocator, test_larger) {
- LinkerAllocator<test_struct_larger> allocator;
+ LinkerTypeAllocator<test_struct_larger> allocator;
test_struct_larger* ptr1 = allocator.alloc();
test_struct_larger* ptr2 = allocator.alloc();
@@ -99,7 +99,7 @@
}
static void protect_all() {
- LinkerAllocator<test_struct_larger> allocator;
+ LinkerTypeAllocator<test_struct_larger> allocator;
// number of allocs to reach the end of first page
size_t n = kPageSize/sizeof(test_struct_larger) - 1;
diff --git a/linker/tests/linker_memory_allocator_test.cpp b/linker/tests/linker_memory_allocator_test.cpp
new file mode 100644
index 0000000..f002a0d
--- /dev/null
+++ b/linker/tests/linker_memory_allocator_test.cpp
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+
+#include <gtest/gtest.h>
+
+#include "../linker_allocator.h"
+
+#include <unistd.h>
+
+namespace {
+
+/*
+ * this one has size below allocator cap which is 2*sizeof(void*)
+ */
+struct test_struct_small {
+ char dummy_str[5];
+};
+
+struct test_struct_large {
+ char dummy_str[1009];
+};
+
+struct test_struct_huge {
+ char dummy_str[73939];
+};
+
+struct test_struct_512 {
+ char dummy_str[503];
+};
+
+};
+
+static size_t kPageSize = sysconf(_SC_PAGE_SIZE);
+
+TEST(linker_memory, test_alloc_0) {
+ LinkerMemoryAllocator allocator;
+ void* ptr = allocator.alloc(0);
+ ASSERT_TRUE(ptr != nullptr);
+ free(ptr);
+}
+
+TEST(linker_memory, test_free_nullptr) {
+ LinkerMemoryAllocator allocator;
+ allocator.free(nullptr);
+}
+
+TEST(linker_memory, test_realloc) {
+ LinkerMemoryAllocator allocator;
+ uint32_t* array = reinterpret_cast<uint32_t*>(allocator.alloc(512));
+ const size_t array_size = 512 / sizeof(uint32_t);
+
+ uint32_t model[1000];
+
+ model[0] = 1;
+ model[1] = 1;
+
+ for (size_t i = 2; i < 1000; ++i) {
+ model[i] = model[i - 1] + model[i - 2];
+ }
+
+ memcpy(array, model, array_size);
+
+ uint32_t* reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 1024));
+
+ ASSERT_TRUE(reallocated_ptr != nullptr);
+ ASSERT_TRUE(reallocated_ptr != array);
+
+ ASSERT_TRUE(memcmp(reallocated_ptr, model, array_size) == 0);
+
+ array = reallocated_ptr;
+
+ memcpy(array, model, 2*array_size);
+
+ reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 62));
+
+ ASSERT_TRUE(reallocated_ptr == array);
+
+ reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 4000));
+
+ ASSERT_TRUE(reallocated_ptr != nullptr);
+ ASSERT_TRUE(reallocated_ptr != array);
+
+ ASSERT_TRUE(memcmp(reallocated_ptr, model, array_size * 2) == 0);
+
+ array = reallocated_ptr;
+
+ memcpy(array, model, 4000);
+
+ reallocated_ptr = reinterpret_cast<uint32_t*>(allocator.realloc(array, 64000));
+
+ ASSERT_TRUE(reallocated_ptr != nullptr);
+ ASSERT_TRUE(reallocated_ptr != array);
+
+ ASSERT_TRUE(memcmp(reallocated_ptr, model, 4000) == 0);
+
+ ASSERT_EQ(nullptr, realloc(reallocated_ptr, 0));
+}
+
+TEST(linker_memory, test_small_smoke) {
+ LinkerMemoryAllocator allocator;
+
+ uint8_t zeros[16];
+ memset(zeros, 0, sizeof(zeros));
+
+ test_struct_small* ptr1 =
+ reinterpret_cast<test_struct_small*>(allocator.alloc(sizeof(test_struct_small)));
+ test_struct_small* ptr2 =
+ reinterpret_cast<test_struct_small*>(allocator.alloc(sizeof(test_struct_small)));
+
+ ASSERT_TRUE(ptr1 != nullptr);
+ ASSERT_TRUE(ptr2 != nullptr);
+ ASSERT_EQ(reinterpret_cast<uintptr_t>(ptr1)+16, reinterpret_cast<uintptr_t>(ptr2));
+ ASSERT_TRUE(memcmp(ptr1, zeros, 16) == 0);
+
+ allocator.free(ptr1);
+ allocator.free(ptr2);
+}
+
+TEST(linker_memory, test_huge_smoke) {
+ LinkerMemoryAllocator allocator;
+
+ // this should trigger proxy-to-mmap
+ test_struct_huge* ptr1 =
+ reinterpret_cast<test_struct_huge*>(allocator.alloc(sizeof(test_struct_huge)));
+ test_struct_huge* ptr2 =
+ reinterpret_cast<test_struct_huge*>(allocator.alloc(sizeof(test_struct_huge)));
+
+ ASSERT_TRUE(ptr1 != nullptr);
+ ASSERT_TRUE(ptr2 != nullptr);
+
+ ASSERT_TRUE(
+ reinterpret_cast<uintptr_t>(ptr1)/kPageSize != reinterpret_cast<uintptr_t>(ptr2)/kPageSize);
+ allocator.free(ptr2);
+ allocator.free(ptr1);
+}
+
+TEST(linker_memory, test_large) {
+ LinkerMemoryAllocator allocator;
+
+ test_struct_large* ptr1 =
+ reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large)));
+ test_struct_large* ptr2 =
+ reinterpret_cast<test_struct_large*>(allocator.alloc(1024));
+
+ ASSERT_TRUE(ptr1 != nullptr);
+ ASSERT_TRUE(ptr2 != nullptr);
+
+ ASSERT_EQ(reinterpret_cast<uintptr_t>(ptr1) + 1024, reinterpret_cast<uintptr_t>(ptr2));
+
+ // let's allocate until we reach the next page.
+ size_t n = kPageSize / sizeof(test_struct_large) + 1 - 2;
+ test_struct_large* objects[n];
+
+ for (size_t i = 0; i < n; ++i) {
+ test_struct_large* obj_ptr =
+ reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large)));
+ ASSERT_TRUE(obj_ptr != nullptr);
+ objects[i] = obj_ptr;
+ }
+
+ test_struct_large* ptr_to_free =
+ reinterpret_cast<test_struct_large*>(allocator.alloc(sizeof(test_struct_large)));
+
+ ASSERT_TRUE(ptr_to_free != nullptr);
+
+ allocator.free(ptr1);
+
+ for (size_t i=0; i<n; ++i) {
+ allocator.free(objects[i]);
+ }
+
+ allocator.free(ptr2);
+ allocator.free(ptr_to_free);
+}
+
+
diff --git a/tests/dlext_test.cpp b/tests/dlext_test.cpp
index 0849b27..d832653 100644
--- a/tests/dlext_test.cpp
+++ b/tests/dlext_test.cpp
@@ -144,7 +144,7 @@
ASSERT_TRUE(android_data != nullptr);
char lib_path[PATH_MAX];
- snprintf(lib_path, sizeof(lib_path), LIBPATH, android_data);
+ snprintf(lib_path, sizeof(lib_path), LIBZIPPATH, android_data);
android_dlextinfo extinfo;
extinfo.flags = ANDROID_DLEXT_USE_LIBRARY_FD | ANDROID_DLEXT_USE_LIBRARY_FD_OFFSET;
diff --git a/tests/dlfcn_test.cpp b/tests/dlfcn_test.cpp
index 3b1001a..dfb5e54 100644
--- a/tests/dlfcn_test.cpp
+++ b/tests/dlfcn_test.cpp
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdint.h>
-#include "gtest_ex.h"
#include "private/ScopeGuard.h"
#include <string>
@@ -376,33 +375,31 @@
// Test dlopens parent1 which loads and relocates libtest_two_parents_child.so
// as a second step it dlopens parent2 and dlcloses parent1...
- test_isolated([] {
- void* handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL);
- ASSERT_TRUE(handle != nullptr) << dlerror();
+ void* handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL);
+ ASSERT_TRUE(handle != nullptr) << dlerror();
- void* handle2 = dlopen("libtest_two_parents_parent2.so", RTLD_NOW | RTLD_LOCAL);
- ASSERT_TRUE(handle2 != nullptr) << dlerror();
+ void* handle2 = dlopen("libtest_two_parents_parent2.so", RTLD_NOW | RTLD_LOCAL);
+ ASSERT_TRUE(handle2 != nullptr) << dlerror();
- typedef int (*fn_t) (void);
- fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
- ASSERT_TRUE(fn != nullptr) << dlerror();
- ASSERT_EQ(42, fn());
+ typedef int (*fn_t) (void);
+ fn_t fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
+ ASSERT_TRUE(fn != nullptr) << dlerror();
+ ASSERT_EQ(42, fn());
- ASSERT_EQ(0, dlclose(handle));
+ ASSERT_EQ(0, dlclose(handle));
- handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL | RTLD_NOLOAD);
- ASSERT_TRUE(handle != nullptr);
- ASSERT_EQ(0, dlclose(handle));
+ handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL | RTLD_NOLOAD);
+ ASSERT_TRUE(handle != nullptr);
+ ASSERT_EQ(0, dlclose(handle));
- fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
- ASSERT_TRUE(fn != nullptr) << dlerror();
- ASSERT_EQ(42, fn());
+ fn = reinterpret_cast<fn_t>(dlsym(handle2, "check_order_reloc_get_answer"));
+ ASSERT_TRUE(fn != nullptr) << dlerror();
+ ASSERT_EQ(42, fn());
- ASSERT_EQ(0, dlclose(handle2));
+ ASSERT_EQ(0, dlclose(handle2));
- handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL | RTLD_NOLOAD);
- ASSERT_TRUE(handle == nullptr);
- });
+ handle = dlopen("libtest_two_parents_parent1.so", RTLD_NOW | RTLD_LOCAL | RTLD_NOLOAD);
+ ASSERT_TRUE(handle == nullptr);
}
extern "C" int check_order_reloc_root_get_answer_impl() {
@@ -485,25 +482,23 @@
// libtest_with_dependency_loop_b.so -> libtest_with_dependency_loop_c.so ->
// libtest_with_dependency_loop_a.so
TEST(dlfcn, dlopen_check_loop) {
- test_isolated([] {
- void* handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW);
- ASSERT_TRUE(handle != nullptr) << dlerror();
- void* f = dlsym(handle, "dlopen_test_loopy_function");
- ASSERT_TRUE(f != nullptr) << dlerror();
- EXPECT_TRUE(reinterpret_cast<bool (*)(void)>(f)());
- ASSERT_EQ(0, dlclose(handle));
+ void* handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW);
+ ASSERT_TRUE(handle != nullptr) << dlerror();
+ void* f = dlsym(handle, "dlopen_test_loopy_function");
+ ASSERT_TRUE(f != nullptr) << dlerror();
+ EXPECT_TRUE(reinterpret_cast<bool (*)(void)>(f)());
+ ASSERT_EQ(0, dlclose(handle));
- // dlopen second time to make sure that the library was unloaded correctly
- handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW | RTLD_NOLOAD);
- ASSERT_TRUE(handle == nullptr);
+ // dlopen second time to make sure that the library was unloaded correctly
+ handle = dlopen("libtest_with_dependency_loop.so", RTLD_NOW | RTLD_NOLOAD);
+ ASSERT_TRUE(handle == nullptr);
#ifdef __BIONIC__
- // TODO: glibc returns nullptr on dlerror() here. Is it bug?
- ASSERT_STREQ("dlopen failed: library \"libtest_with_dependency_loop.so\" wasn't loaded and RTLD_NOLOAD prevented it", dlerror());
+ // TODO: glibc returns nullptr on dlerror() here. Is it bug?
+ ASSERT_STREQ("dlopen failed: library \"libtest_with_dependency_loop.so\" wasn't loaded and RTLD_NOLOAD prevented it", dlerror());
#endif
- handle = dlopen("libtest_with_dependency_a.so", RTLD_NOW | RTLD_NOLOAD);
- ASSERT_TRUE(handle == nullptr);
- });
+ handle = dlopen("libtest_with_dependency_a.so", RTLD_NOW | RTLD_NOLOAD);
+ ASSERT_TRUE(handle == nullptr);
}
TEST(dlfcn, dlopen_nodelete) {
@@ -830,15 +825,13 @@
}
TEST(dlfcn, dlopen_undefined_weak_func) {
- test_isolated([] {
- void* handle = dlopen("libtest_dlopen_weak_undefined_func.so", RTLD_NOW);
- ASSERT_TRUE(handle != nullptr) << dlerror();
- int (*weak_func)();
- weak_func = reinterpret_cast<int (*)()>(dlsym(handle, "use_weak_undefined_func"));
- ASSERT_TRUE(weak_func != nullptr) << dlerror();
- EXPECT_EQ(6551, weak_func());
- dlclose(handle);
- });
+ void* handle = dlopen("libtest_dlopen_weak_undefined_func.so", RTLD_NOW);
+ ASSERT_TRUE(handle != nullptr) << dlerror();
+ int (*weak_func)();
+ weak_func = reinterpret_cast<int (*)()>(dlsym(handle, "use_weak_undefined_func"));
+ ASSERT_TRUE(weak_func != nullptr) << dlerror();
+ EXPECT_EQ(6551, weak_func());
+ dlclose(handle);
}
TEST(dlfcn, dlopen_symlink) {
diff --git a/tests/gtest_ex.h b/tests/gtest_ex.h
deleted file mode 100644
index fe1d894..0000000
--- a/tests/gtest_ex.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <gtest/gtest.h>
-
-#include <sys/types.h>
-#include <sys/wait.h>
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-template<typename F>
-void test_isolated(F test) {
- int pid = fork();
- ASSERT_NE(-1, pid) << strerror(errno);
-
- if (pid == 0) {
- test();
- _exit(testing::Test::HasFailure() ? 1 : 0);
- }
-
- int status;
- ASSERT_EQ(pid, waitpid(pid, &status, 0));
- ASSERT_TRUE(WIFEXITED(status));
- ASSERT_EQ(0, WEXITSTATUS(status)) << "Forked test has failed, see above..";
-}
diff --git a/tests/gtest_main.cpp b/tests/gtest_main.cpp
index b1953fc..bf2b695 100644
--- a/tests/gtest_main.cpp
+++ b/tests/gtest_main.cpp
@@ -741,7 +741,8 @@
// We choose to use multi-fork and multi-wait here instead of multi-thread, because it always
// makes deadlock to use fork in multi-thread.
-static void RunTestInSeparateProc(int argc, char** argv, std::vector<TestCase>& testcase_list,
+// Returns true if all tests run successfully, otherwise return false.
+static bool RunTestInSeparateProc(int argc, char** argv, std::vector<TestCase>& testcase_list,
size_t iteration_count, size_t job_count,
const std::string& xml_output_filename) {
// Stop default result printer to avoid environment setup/teardown information for each test.
@@ -759,6 +760,8 @@
exit(1);
}
+ bool all_tests_passed = true;
+
for (size_t iteration = 1; iteration <= iteration_count; ++iteration) {
OnTestIterationStartPrint(testcase_list, iteration, iteration_count);
int64_t iteration_start_time_ns = NanoTime();
@@ -806,6 +809,9 @@
if (++finished_test_count_list[testcase_id] == testcase.TestCount()) {
++finished_testcase_count;
}
+ if (testcase.GetTestResult(test_id) != TEST_SUCCESS) {
+ all_tests_passed = false;
+ }
it = child_proc_list.erase(it);
} else {
@@ -827,6 +833,8 @@
perror("sigprocmask SIG_SETMASK");
exit(1);
}
+
+ return all_tests_passed;
}
static size_t GetProcessorCount() {
@@ -1061,15 +1069,15 @@
if (EnumerateTests(argc, arg_list.data(), testcase_list) == false) {
return 1;
}
- RunTestInSeparateProc(argc, arg_list.data(), testcase_list, options.gtest_repeat,
- options.job_count, options.gtest_output);
+ bool all_test_passed = RunTestInSeparateProc(argc, arg_list.data(), testcase_list,
+ options.gtest_repeat, options.job_count, options.gtest_output);
+ return all_test_passed ? 0 : 1;
} else {
argc = static_cast<int>(arg_list.size());
arg_list.push_back(NULL);
testing::InitGoogleTest(&argc, arg_list.data());
return RUN_ALL_TESTS();
}
- return 0;
}
//################################################################################
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index c507faa..de60f28 100644
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -19,7 +19,6 @@
#include "private/ScopeGuard.h"
#include "BionicDeathTest.h"
#include "ScopedSignalHandler.h"
-#include "gtest_ex.h"
#include <errno.h>
#include <inttypes.h>
@@ -733,8 +732,10 @@
pthread_t thread;
ASSERT_EQ(0, pthread_create(&thread, NULL,
reinterpret_cast<void* (*)(void*)>(pthread_rwlock_reader_wakeup_writer_helper), &wakeup_arg));
- sleep(1);
- ASSERT_EQ(RwlockWakeupHelperArg::LOCK_WAITING, wakeup_arg.progress);
+ while (wakeup_arg.progress != RwlockWakeupHelperArg::LOCK_WAITING) {
+ usleep(5000);
+ }
+ usleep(5000);
wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_RELEASED;
ASSERT_EQ(0, pthread_rwlock_unlock(&wakeup_arg.lock));
@@ -764,8 +765,10 @@
pthread_t thread;
ASSERT_EQ(0, pthread_create(&thread, NULL,
reinterpret_cast<void* (*)(void*)>(pthread_rwlock_writer_wakeup_reader_helper), &wakeup_arg));
- sleep(1);
- ASSERT_EQ(RwlockWakeupHelperArg::LOCK_WAITING, wakeup_arg.progress);
+ while (wakeup_arg.progress != RwlockWakeupHelperArg::LOCK_WAITING) {
+ usleep(5000);
+ }
+ usleep(5000);
wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_RELEASED;
ASSERT_EQ(0, pthread_rwlock_unlock(&wakeup_arg.lock));
@@ -817,23 +820,21 @@
static void AtForkChild2() { g_atfork_child_calls = (g_atfork_child_calls << 4) | 2; }
TEST(pthread, pthread_atfork_smoke) {
- test_isolated([] {
- ASSERT_EQ(0, pthread_atfork(AtForkPrepare1, AtForkParent1, AtForkChild1));
- ASSERT_EQ(0, pthread_atfork(AtForkPrepare2, AtForkParent2, AtForkChild2));
+ ASSERT_EQ(0, pthread_atfork(AtForkPrepare1, AtForkParent1, AtForkChild1));
+ ASSERT_EQ(0, pthread_atfork(AtForkPrepare2, AtForkParent2, AtForkChild2));
- int pid = fork();
- ASSERT_NE(-1, pid) << strerror(errno);
+ int pid = fork();
+ ASSERT_NE(-1, pid) << strerror(errno);
- // Child and parent calls are made in the order they were registered.
- if (pid == 0) {
- ASSERT_EQ(0x12, g_atfork_child_calls);
- _exit(0);
- }
- ASSERT_EQ(0x12, g_atfork_parent_calls);
+ // Child and parent calls are made in the order they were registered.
+ if (pid == 0) {
+ ASSERT_EQ(0x12, g_atfork_child_calls);
+ _exit(0);
+ }
+ ASSERT_EQ(0x12, g_atfork_parent_calls);
- // Prepare calls are made in the reverse order.
- ASSERT_EQ(0x21, g_atfork_prepare_calls);
- });
+ // Prepare calls are made in the reverse order.
+ ASSERT_EQ(0x21, g_atfork_prepare_calls);
}
TEST(pthread, pthread_attr_getscope) {
@@ -875,7 +876,7 @@
}
TEST(pthread, pthread_cond_broadcast__preserves_condattr_flags) {
-#if defined(__BIONIC__) // This tests a bionic implementation detail.
+#if defined(__BIONIC__)
pthread_condattr_t attr;
pthread_condattr_init(&attr);
@@ -888,16 +889,78 @@
ASSERT_EQ(0, pthread_cond_signal(&cond_var));
ASSERT_EQ(0, pthread_cond_broadcast(&cond_var));
- attr = static_cast<pthread_condattr_t>(cond_var.value);
+ attr = static_cast<pthread_condattr_t>(*reinterpret_cast<uint32_t*>(cond_var.__private));
clockid_t clock;
ASSERT_EQ(0, pthread_condattr_getclock(&attr, &clock));
ASSERT_EQ(CLOCK_MONOTONIC, clock);
int pshared;
ASSERT_EQ(0, pthread_condattr_getpshared(&attr, &pshared));
ASSERT_EQ(PTHREAD_PROCESS_SHARED, pshared);
-#else // __BIONIC__
- GTEST_LOG_(INFO) << "This test does nothing.\n";
-#endif // __BIONIC__
+#else // !defined(__BIONIC__)
+ GTEST_LOG_(INFO) << "This tests a bionic implementation detail.\n";
+#endif // !defined(__BIONIC__)
+}
+
+class pthread_CondWakeupTest : public ::testing::Test {
+ protected:
+ pthread_mutex_t mutex;
+ pthread_cond_t cond;
+
+ enum Progress {
+ INITIALIZED,
+ WAITING,
+ SIGNALED,
+ FINISHED,
+ };
+ std::atomic<Progress> progress;
+ pthread_t thread;
+
+ protected:
+ virtual void SetUp() {
+ ASSERT_EQ(0, pthread_mutex_init(&mutex, NULL));
+ ASSERT_EQ(0, pthread_cond_init(&cond, NULL));
+ progress = INITIALIZED;
+ ASSERT_EQ(0,
+ pthread_create(&thread, NULL, reinterpret_cast<void* (*)(void*)>(WaitThreadFn), this));
+ }
+
+ virtual void TearDown() {
+ ASSERT_EQ(0, pthread_join(thread, NULL));
+ ASSERT_EQ(FINISHED, progress);
+ ASSERT_EQ(0, pthread_cond_destroy(&cond));
+ ASSERT_EQ(0, pthread_mutex_destroy(&mutex));
+ }
+
+ void SleepUntilProgress(Progress expected_progress) {
+ while (progress != expected_progress) {
+ usleep(5000);
+ }
+ usleep(5000);
+ }
+
+ private:
+ static void WaitThreadFn(pthread_CondWakeupTest* test) {
+ ASSERT_EQ(0, pthread_mutex_lock(&test->mutex));
+ test->progress = WAITING;
+ while (test->progress == WAITING) {
+ ASSERT_EQ(0, pthread_cond_wait(&test->cond, &test->mutex));
+ }
+ ASSERT_EQ(SIGNALED, test->progress);
+ test->progress = FINISHED;
+ ASSERT_EQ(0, pthread_mutex_unlock(&test->mutex));
+ }
+};
+
+TEST_F(pthread_CondWakeupTest, signal) {
+ SleepUntilProgress(WAITING);
+ progress = SIGNALED;
+ pthread_cond_signal(&cond);
+}
+
+TEST_F(pthread_CondWakeupTest, broadcast) {
+ SleepUntilProgress(WAITING);
+ progress = SIGNALED;
+ pthread_cond_broadcast(&cond);
}
TEST(pthread, pthread_mutex_timedlock) {
@@ -1118,15 +1181,21 @@
ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
ASSERT_EQ(0, pthread_mutexattr_gettype(&attr, &attr_type));
ASSERT_EQ(PTHREAD_MUTEX_RECURSIVE, attr_type);
+
+ ASSERT_EQ(0, pthread_mutexattr_destroy(&attr));
+}
+
+static void CreateMutex(pthread_mutex_t& mutex, int mutex_type) {
+ pthread_mutexattr_t attr;
+ ASSERT_EQ(0, pthread_mutexattr_init(&attr));
+ ASSERT_EQ(0, pthread_mutexattr_settype(&attr, mutex_type));
+ ASSERT_EQ(0, pthread_mutex_init(&mutex, &attr));
+ ASSERT_EQ(0, pthread_mutexattr_destroy(&attr));
}
TEST(pthread, pthread_mutex_lock_NORMAL) {
- pthread_mutexattr_t attr;
- ASSERT_EQ(0, pthread_mutexattr_init(&attr));
- ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL));
-
pthread_mutex_t lock;
- ASSERT_EQ(0, pthread_mutex_init(&lock, &attr));
+ CreateMutex(lock, PTHREAD_MUTEX_NORMAL);
ASSERT_EQ(0, pthread_mutex_lock(&lock));
ASSERT_EQ(0, pthread_mutex_unlock(&lock));
@@ -1134,12 +1203,8 @@
}
TEST(pthread, pthread_mutex_lock_ERRORCHECK) {
- pthread_mutexattr_t attr;
- ASSERT_EQ(0, pthread_mutexattr_init(&attr));
- ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK));
-
pthread_mutex_t lock;
- ASSERT_EQ(0, pthread_mutex_init(&lock, &attr));
+ CreateMutex(lock, PTHREAD_MUTEX_ERRORCHECK);
ASSERT_EQ(0, pthread_mutex_lock(&lock));
ASSERT_EQ(EDEADLK, pthread_mutex_lock(&lock));
@@ -1152,12 +1217,8 @@
}
TEST(pthread, pthread_mutex_lock_RECURSIVE) {
- pthread_mutexattr_t attr;
- ASSERT_EQ(0, pthread_mutexattr_init(&attr));
- ASSERT_EQ(0, pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE));
-
pthread_mutex_t lock;
- ASSERT_EQ(0, pthread_mutex_init(&lock, &attr));
+ CreateMutex(lock, PTHREAD_MUTEX_RECURSIVE);
ASSERT_EQ(0, pthread_mutex_lock(&lock));
ASSERT_EQ(0, pthread_mutex_lock(&lock));
@@ -1169,6 +1230,66 @@
ASSERT_EQ(0, pthread_mutex_destroy(&lock));
}
+class MutexWakeupHelper {
+ private:
+ pthread_mutex_t mutex;
+ enum Progress {
+ LOCK_INITIALIZED,
+ LOCK_WAITING,
+ LOCK_RELEASED,
+ LOCK_ACCESSED
+ };
+ std::atomic<Progress> progress;
+
+ static void thread_fn(MutexWakeupHelper* helper) {
+ ASSERT_EQ(LOCK_INITIALIZED, helper->progress);
+ helper->progress = LOCK_WAITING;
+
+ ASSERT_EQ(0, pthread_mutex_lock(&helper->mutex));
+ ASSERT_EQ(LOCK_RELEASED, helper->progress);
+ ASSERT_EQ(0, pthread_mutex_unlock(&helper->mutex));
+
+ helper->progress = LOCK_ACCESSED;
+ }
+
+ public:
+ void test(int mutex_type) {
+ CreateMutex(mutex, mutex_type);
+ ASSERT_EQ(0, pthread_mutex_lock(&mutex));
+ progress = LOCK_INITIALIZED;
+
+ pthread_t thread;
+ ASSERT_EQ(0, pthread_create(&thread, NULL,
+ reinterpret_cast<void* (*)(void*)>(MutexWakeupHelper::thread_fn), this));
+
+ while (progress != LOCK_WAITING) {
+ usleep(5000);
+ }
+ usleep(5000);
+ progress = LOCK_RELEASED;
+ ASSERT_EQ(0, pthread_mutex_unlock(&mutex));
+
+ ASSERT_EQ(0, pthread_join(thread, NULL));
+ ASSERT_EQ(LOCK_ACCESSED, progress);
+ ASSERT_EQ(0, pthread_mutex_destroy(&mutex));
+ }
+};
+
+TEST(pthread, pthread_mutex_NORMAL_wakeup) {
+ MutexWakeupHelper helper;
+ helper.test(PTHREAD_MUTEX_NORMAL);
+}
+
+TEST(pthread, pthread_mutex_ERRORCHECK_wakeup) {
+ MutexWakeupHelper helper;
+ helper.test(PTHREAD_MUTEX_ERRORCHECK);
+}
+
+TEST(pthread, pthread_mutex_RECURSIVE_wakeup) {
+ MutexWakeupHelper helper;
+ helper.test(PTHREAD_MUTEX_RECURSIVE);
+}
+
TEST(pthread, pthread_mutex_owner_tid_limit) {
FILE* fp = fopen("/proc/sys/kernel/pid_max", "r");
ASSERT_TRUE(fp != NULL);
diff --git a/tests/sys_stat_test.cpp b/tests/sys_stat_test.cpp
index 28c7c52..7c387ba 100644
--- a/tests/sys_stat_test.cpp
+++ b/tests/sys_stat_test.cpp
@@ -138,13 +138,18 @@
#endif
}
+static void AssertFileModeEquals(mode_t expected_mode, const char* filename) {
+ struct stat sb;
+ ASSERT_EQ(0, stat(filename, &sb));
+ mode_t mask = S_IRWXU | S_IRWXG | S_IRWXO;
+ ASSERT_EQ(expected_mode & mask, static_cast<mode_t>(sb.st_mode) & mask);
+}
+
TEST(sys_stat, fchmodat_file) {
TemporaryFile tf;
- struct stat sb;
ASSERT_EQ(0, fchmodat(AT_FDCWD, tf.filename, 0751, 0));
- ASSERT_EQ(0, fstat(tf.fd, &sb));
- ASSERT_TRUE(0751 == (sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)));
+ AssertFileModeEquals(0751, tf.filename);
}
TEST(sys_stat, fchmodat_AT_SYMLINK_NOFOLLOW_file) {
@@ -153,11 +158,9 @@
int result = fchmodat(AT_FDCWD, tf.filename, 0751, AT_SYMLINK_NOFOLLOW);
#if defined(__BIONIC__)
- struct stat sb;
ASSERT_EQ(0, result);
ASSERT_EQ(0, errno);
- ASSERT_EQ(0, fstat(tf.fd, &sb));
- ASSERT_TRUE(0751 == (sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)));
+ AssertFileModeEquals(0751, tf.filename);
#else
// glibc 2.19 does not implement AT_SYMLINK_NOFOLLOW and always
// returns ENOTSUP
@@ -169,14 +172,12 @@
TEST(sys_stat, fchmodat_symlink) {
TemporaryFile tf;
char linkname[255];
- struct stat sb;
snprintf(linkname, sizeof(linkname), "%s.link", tf.filename);
ASSERT_EQ(0, symlink(tf.filename, linkname));
ASSERT_EQ(0, fchmodat(AT_FDCWD, linkname, 0751, 0));
- ASSERT_EQ(0, fstat(tf.fd, &sb));
- ASSERT_TRUE(0751 == (sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)));
+ AssertFileModeEquals(0751, tf.filename);
unlink(linkname);
}
@@ -194,29 +195,54 @@
unlink(linkname);
}
+static void AssertSymlinkModeEquals(mode_t expected_mode, const char* linkname) {
+ struct stat sb;
+ ASSERT_EQ(0, fstatat(AT_FDCWD, linkname, &sb, AT_SYMLINK_NOFOLLOW));
+ mode_t mask = S_IRWXU | S_IRWXG | S_IRWXO;
+ ASSERT_EQ(expected_mode & mask, static_cast<mode_t>(sb.st_mode) & mask);
+}
+
TEST(sys_stat, fchmodat_AT_SYMLINK_NOFOLLOW_with_symlink) {
TemporaryFile tf;
- char linkname[255];
+ struct stat tf_sb;
+ ASSERT_EQ(0, stat(tf.filename, &tf_sb));
+ char linkname[255];
snprintf(linkname, sizeof(linkname), "%s.link", tf.filename);
ASSERT_EQ(0, symlink(tf.filename, linkname));
- ASSERT_EQ(-1, fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW));
- ASSERT_EQ(ENOTSUP, errno);
+ int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW);
+ // It depends on the kernel whether chmod operation on symlink is allowed.
+ if (result == 0) {
+ AssertSymlinkModeEquals(0751, linkname);
+ } else {
+ ASSERT_EQ(-1, result);
+ ASSERT_EQ(ENOTSUP, errno);
+ }
+
+ // Target file mode shouldn't be modified.
+ AssertFileModeEquals(tf_sb.st_mode, tf.filename);
unlink(linkname);
}
TEST(sys_stat, fchmodat_AT_SYMLINK_NOFOLLOW_with_dangling_symlink) {
TemporaryFile tf;
+
char linkname[255];
char target[255];
-
snprintf(linkname, sizeof(linkname), "%s.link", tf.filename);
snprintf(target, sizeof(target), "%s.doesnotexist", tf.filename);
ASSERT_EQ(0, symlink(target, linkname));
- ASSERT_EQ(-1, fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW));
- ASSERT_EQ(ENOTSUP, errno);
+ int result = fchmodat(AT_FDCWD, linkname, 0751, AT_SYMLINK_NOFOLLOW);
+ // It depends on the kernel whether chmod operation on symlink is allowed.
+ if (result == 0) {
+ AssertSymlinkModeEquals(0751, linkname);
+ } else {
+ ASSERT_EQ(-1, result);
+ ASSERT_EQ(ENOTSUP, errno);
+ }
+
unlink(linkname);
}
diff --git a/tools/Android.mk b/tools/Android.mk
new file mode 100644
index 0000000..4dd66fe
--- /dev/null
+++ b/tools/Android.mk
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/tools/relocation_packer/Android.mk b/tools/relocation_packer/Android.mk
new file mode 100644
index 0000000..99a39c0
--- /dev/null
+++ b/tools/relocation_packer/Android.mk
@@ -0,0 +1,96 @@
+#
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+common_cppflags := -Wall -Wextra -Wunused -Werror -Wold-style-cast
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_CPP_EXTENSION := .cc
+
+LOCAL_SRC_FILES := \
+ src/debug.cc \
+ src/delta_encoder.cc \
+ src/elf_file.cc \
+ src/leb128.cc \
+ src/packer.cc \
+ src/sleb128.cc \
+
+LOCAL_STATIC_LIBRARIES := libelf
+LOCAL_C_INCLUDES := external/elfutils/src/libelf
+LOCAL_MODULE := lib_relocation_packer
+
+LOCAL_CPPFLAGS := $(common_cppflags)
+
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_CPP_EXTENSION := .cc
+
+LOCAL_SRC_FILES := src/main.cc
+LOCAL_STATIC_LIBRARIES := lib_relocation_packer libelf
+LOCAL_C_INCLUDES := external/elfutils/src/libelf libnativehelper/include
+
+LOCAL_MODULE := relocation_packer
+
+LOCAL_CPPFLAGS := $(common_cppflags)
+
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
+include $(BUILD_HOST_EXECUTABLE)
+
+include $(CLEAR_VARS)
+
+LOCAL_CPP_EXTENSION := .cc
+
+LOCAL_SRC_FILES := \
+ src/debug_unittest.cc \
+ src/delta_encoder_unittest.cc \
+ src/elf_file_unittest.cc \
+ src/leb128_unittest.cc \
+ src/sleb128_unittest.cc \
+ src/packer_unittest.cc \
+
+LOCAL_STATIC_LIBRARIES := lib_relocation_packer libelf
+LOCAL_C_INCLUDES := external/elfutils/src/libelf
+
+LOCAL_CPPFLAGS := $(common_cppflags)
+
+LOCAL_MODULE := relocation_packer_unit_tests
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
+include $(BUILD_HOST_NATIVE_TEST)
+
+# $(1) library name
+define copy-test-library
+include $(CLEAR_VARS)
+LOCAL_IS_HOST_MODULE := true
+LOCAL_MODULE := $(1)
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+LOCAL_MODULE_PATH := $(HOST_OUT_EXECUTABLES)
+LOCAL_STRIP_MODULE := false
+LOCAL_SRC_FILES := test_data/$(1)
+include $(BUILD_PREBUILT)
+endef
+
+$(eval $(call copy-test-library,elf_file_unittest_relocs_arm32.so))
+$(eval $(call copy-test-library,elf_file_unittest_relocs_arm32_packed.so))
+$(eval $(call copy-test-library,elf_file_unittest_relocs_arm64.so))
+$(eval $(call copy-test-library,elf_file_unittest_relocs_arm64_packed.so))
diff --git a/tools/relocation_packer/LICENSE b/tools/relocation_packer/LICENSE
new file mode 100644
index 0000000..972bb2e
--- /dev/null
+++ b/tools/relocation_packer/LICENSE
@@ -0,0 +1,27 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/tools/relocation_packer/README.TXT b/tools/relocation_packer/README.TXT
new file mode 100644
index 0000000..071ab5d
--- /dev/null
+++ b/tools/relocation_packer/README.TXT
@@ -0,0 +1,135 @@
+Introduction:
+-------------
+
+Relative relocations are the bulk of dynamic relocations (the .rel.dyn
+or .rela.dyn sections) in libchrome.<version>.so. The ELF standard
+representation of them is wasteful.
+
+Packing uses a combination of run length encoding, delta encoding, and LEB128
+encoding to store them more efficiently. Packed relocations are placed in
+a new .android.rel.dyn or .android.rela.dyn section. Packing reduces
+the footprint of libchrome.<version>.so in the filesystem, in APK downloads,
+and in memory when loaded on the device.
+
+A packed libchrome.<version>.so is designed so that it can be loaded directly
+on Android, but requires the explicit support of a crazy linker that has been
+extended to understand packed relocations. Packed relocations are currently
+only supported on ARM.
+
+A packed libchrome.<version>.so cannot currently be used with the standard
+Android runtime linker.
+
+See src/*.h for design and implementation notes.
+
+
+Notes:
+------
+
+Packing does not adjust debug data. An unstripped libchrome.<version>.so
+can be packed and will run, but may no longer be useful for debugging.
+
+Unpacking on the device requires the explicit support of an extended crazy
+linker. Adds the following new .dynamic tags, used by the crazy linker to
+find the packed .android.rel.dyn or .android.rela.dyn section data:
+
+ DT_ANDROID_REL_OFFSET = DT_LOOS (Operating System specific: 0x6000000d)
+ - The offset of packed relocation data in libchrome.<version>.so
+ DT_ANDROID_REL_SIZE = DT_LOOS + 1 (Operating System Specific: 0x6000000e)
+ - The size of packed relocation data in bytes
+
+32 bit ARM libraries use relocations without addends. 64 bit ARM libraries
+use relocations with addends. The packing strategy necessarily differs for
+the two relocation types.
+
+Where libchrome.<version>.so contains relocations without addends, the format
+of .android.rel.dyn data is:
+
+ "APR1" identifier
+ N: the number of count-delta pairs in the encoding
+ A: the initial offset
+ N * C,D: N count-delta pairs
+
+Where libchrome.<version>.so contains relocations with addends, the format
+of .android.rela.dyn data is:
+
+ "APA1" identifier
+ N: the number of addr-addend delta pairs in the encoding
+ N * A,V: N addr-addend delta pairs
+
+All numbers in the encoding stream are stored as LEB128 values. For details
+see http://en.wikipedia.org/wiki/LEB128.
+
+The streaming unpacking algorithm for 32 bit ARM is:
+
+ skip over "APR1"
+ pairs, addr = next leb128 value, next leb128 value
+ emit R_ARM_RELATIVE relocation with r_offset = addr
+ while pairs:
+ count, delta = next leb128 value, next leb128 value
+ while count:
+ addr += delta
+ emit R_ARM_RELATIVE relocation with r_offset = addr
+ count--
+ pairs--
+
+The streaming unpacking algorithm for 64 bit ARM is:
+
+ skip over "APA1"
+ pairs = next signed leb128 value
+ addr, addend = 0, 0
+ while pairs:
+ addr += next signed leb128 value
+ addend += next signed leb128 value
+ emit R_AARCH64_RELATIVE relocation with r_offset = addr, r_addend = addend
+ pairs--
+
+
+Usage instructions:
+-------------------
+
+To pack relocations, add an empty .android.rel.dyn or .android.rela.dyn and
+then run the tool:
+
+ echo -n 'NULL' >/tmp/small
+ if file libchrome.<version>.so | grep -q 'ELF 32'; then
+ arm-linux-androideabi-objcopy
+ --add-section .android.rel.dyn=/tmp/small
+ libchrome.<version>.so libchrome.<version>.so.packed
+ else
+ aarch64-linux-android-objcopy
+ --add-section .android.rela.dyn=/tmp/small
+ libchrome.<version>.so libchrome.<version>.so.packed
+ fi
+ rm /tmp/small
+ relocation_packer libchrome.<version>.so.packed
+
+To unpack and restore the shared library to its original state:
+
+ cp libchrome.<version>.so.packed unpackable
+ relocation_packer -u unpackable
+ if file libchrome.<version>.so | grep -q 'ELF 32'; then
+ arm-linux-androideabi-objcopy \
+ --remove-section=.android.rel.dyn unpackable libchrome.<version>.so
+ else
+ aarch64-linux-android-objcopy \
+ --remove-section=.android.rela.dyn unpackable libchrome.<version>.so
+ endif
+ rm unpackable
+
+
+Bugs & TODOs:
+-------------
+
+Requires two free slots in the .dynamic section. Uses these to add data that
+tells the crazy linker where to find the packed relocation data. Fails
+if insufficient free slots exist (use gold --spare-dynamic-slots to increase
+the allocation).
+
+Requires libelf 0.158 or later. Earlier libelf releases may be buggy in
+ways that prevent the packer from working correctly.
+
+
+Testing:
+--------
+
+Unittests run under gtest, on the host system.
diff --git a/tools/relocation_packer/src/debug.cc b/tools/relocation_packer/src/debug.cc
new file mode 100644
index 0000000..29d7ab0
--- /dev/null
+++ b/tools/relocation_packer/src/debug.cc
@@ -0,0 +1,55 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "debug.h"
+
+#include <stdlib.h>
+#include <iostream>
+#include <string>
+
+namespace relocation_packer {
+
+// Construct a new message logger. Prints if level is less than or equal to
+// the level set with SetVerbose() and predicate is true.
+Logger::Logger(Severity severity, int level, bool predicate) {
+ severity_ = severity;
+ level_ = level;
+ predicate_ = predicate;
+}
+
+// On destruction, flush and print the strings accumulated. Abort if FATAL.
+Logger::~Logger() {
+ if (predicate_) {
+ if (level_ <= max_level_) {
+ std::ostream* log = severity_ == INFO ? info_stream_ : error_stream_;
+ std::string tag;
+ switch (severity_) {
+ case INFO: tag = "INFO"; break;
+ case WARNING: tag = "WARNING"; break;
+ case ERROR: tag = "ERROR"; break;
+ case FATAL: tag = "FATAL"; break;
+ }
+ stream_.flush();
+ *log << tag << ": " << stream_.str() << std::endl;
+ }
+ if (severity_ == FATAL)
+ abort();
+ }
+}
+
+// Reset to initial state.
+void Logger::Reset() {
+ max_level_ = -1;
+ info_stream_ = &std::cout;
+ error_stream_ = &std::cerr;
+}
+
+// Verbosity. Not thread-safe.
+int Logger::max_level_ = -1;
+
+// Logging streams. Not thread-safe.
+std::ostream* Logger::info_stream_ = &std::cout;
+std::ostream* Logger::error_stream_ = &std::cerr;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/debug.h b/tools/relocation_packer/src/debug.h
new file mode 100644
index 0000000..48be6c1
--- /dev/null
+++ b/tools/relocation_packer/src/debug.h
@@ -0,0 +1,115 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Logging and checks. Avoids a dependency on base.
+//
+// LOG(tag) prints messages. Tags are INFO, WARNING, ERROR and FATAL.
+// INFO prints to stdout, the others to stderr. FATAL aborts after printing.
+//
+// LOG_IF(tag, predicate) logs if predicate evaluates to true, else silent.
+//
+// VLOG(level) logs INFO messages where level is less than or equal to the
+// verbosity level set with SetVerbose().
+//
+// VLOG_IF(level, predicate) logs INFO if predicate evaluates to true,
+// else silent.
+//
+// CHECK(predicate) logs a FATAL error if predicate is false.
+// NOTREACHED() always aborts.
+// Log streams can be changed with SetStreams(). Logging is not thread-safe.
+//
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_DEBUG_H_
+#define TOOLS_RELOCATION_PACKER_SRC_DEBUG_H_
+
+#include <limits.h>
+#include <ostream>
+#include <sstream>
+
+namespace relocation_packer {
+
+class Logger {
+ public:
+ enum Severity {INFO = 0, WARNING, ERROR, FATAL};
+
+ // Construct a new message logger. Prints if level is less than or
+ // equal to the level set with SetVerbose() and predicate is true.
+ // |severity| is an enumerated severity.
+ // |level| is the verbosity level.
+ // |predicate| controls if the logger prints or is silent.
+ Logger(Severity severity, int level, bool predicate);
+
+ // On destruction, flush and print the strings accumulated in stream_.
+ ~Logger();
+
+ // Return the stream for this logger.
+ std::ostream& GetStream() { return stream_; }
+
+ // Set verbosity level. Messages with a level less than or equal to
+ // this level are printed, others are discarded. Static, not thread-safe.
+ static void SetVerbose(int level) { max_level_ = level; }
+
+ // Set info and error logging streams. Static, not thread-safe.
+ static void SetStreams(std::ostream* info_stream,
+ std::ostream* error_stream) {
+ info_stream_ = info_stream;
+ error_stream_ = error_stream;
+ }
+
+ // Reset to initial state.
+ static void Reset();
+
+ private:
+ // Message severity, verbosity level, and predicate.
+ Severity severity_;
+ int level_;
+ bool predicate_;
+
+ // String stream, accumulates message text.
+ std::ostringstream stream_;
+
+ // Verbosity for INFO messages. Not thread-safe.
+ static int max_level_;
+
+ // Logging streams. Not thread-safe.
+ static std::ostream* info_stream_;
+ static std::ostream* error_stream_;
+};
+
+} // namespace relocation_packer
+
+// Make logging severities visible globally.
+typedef relocation_packer::Logger::Severity LogSeverity;
+using LogSeverity::INFO;
+using LogSeverity::WARNING;
+using LogSeverity::ERROR;
+using LogSeverity::FATAL;
+
+// LOG(severity) prints a message with the given severity, and aborts if
+// severity is FATAL. LOG_IF(severity, predicate) does the same but only if
+// predicate is true. INT_MIN is guaranteed to be less than or equal to
+// any verbosity level.
+#define LOG(severity) \
+ (relocation_packer::Logger(severity, INT_MIN, true).GetStream())
+#define LOG_IF(severity, predicate) \
+ (relocation_packer::Logger(severity, INT_MIN, (predicate)).GetStream())
+
+// VLOG(level) prints its message as INFO if level is less than or equal to
+// the current verbosity level.
+#define VLOG(level) \
+ (relocation_packer::Logger(INFO, (level), true).GetStream())
+#define VLOG_IF(level, predicate) \
+ (relocation_packer::Logger(INFO, (level), (predicate)).GetStream())
+
+// CHECK(predicate) fails with a FATAL log message if predicate is false.
+#define CHECK(predicate) (LOG_IF(FATAL, !(predicate)) \
+ << __FILE__ << ":" << __LINE__ << ": " \
+ << __FUNCTION__ << ": CHECK '" #predicate "' failed")
+
+// NOTREACHED() always fails with a FATAL log message.
+#define NOTREACHED(_) (LOG(FATAL) \
+ << __FILE__ << ":" << __LINE__ << ": " \
+ << __FUNCTION__ << ": NOTREACHED() hit")
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_DEBUG_H_
diff --git a/tools/relocation_packer/src/debug_unittest.cc b/tools/relocation_packer/src/debug_unittest.cc
new file mode 100644
index 0000000..b31e2ae
--- /dev/null
+++ b/tools/relocation_packer/src/debug_unittest.cc
@@ -0,0 +1,122 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "debug.h"
+
+#include <sstream>
+#include "gtest/gtest.h"
+
+namespace relocation_packer {
+
+TEST(Debug, Log) {
+ Logger::Reset();
+ std::ostringstream info;
+ std::ostringstream error;
+ Logger::SetStreams(&info, &error);
+
+ LOG(INFO) << "INFO log message";
+ LOG(WARNING) << "WARNING log message";
+ LOG(ERROR) << "ERROR log message";
+
+ EXPECT_EQ("INFO: INFO log message\n", info.str());
+ EXPECT_EQ("WARNING: WARNING log message\n"
+ "ERROR: ERROR log message\n", error.str());
+ Logger::Reset();
+}
+
+TEST(Debug, LogIf) {
+ Logger::Reset();
+ std::ostringstream info;
+ std::ostringstream error;
+ Logger::SetStreams(&info, &error);
+
+ LOG_IF(INFO, true) << "INFO log message";
+ LOG_IF(INFO, false) << "INFO log message, SHOULD NOT PRINT";
+ LOG_IF(WARNING, true) << "WARNING log message";
+ LOG_IF(WARNING, false) << "WARNING log message, SHOULD NOT PRINT";
+ LOG_IF(ERROR, true) << "ERROR log message";
+ LOG_IF(ERROR, false) << "ERROR log message, SHOULD NOT PRINT";
+ LOG_IF(FATAL, false) << "FATAL log message, SHOULD NOT PRINT";
+
+ EXPECT_EQ("INFO: INFO log message\n", info.str());
+ EXPECT_EQ("WARNING: WARNING log message\n"
+ "ERROR: ERROR log message\n", error.str());
+ Logger::Reset();
+}
+
+TEST(Debug, Vlog) {
+ Logger::Reset();
+ std::ostringstream info;
+ std::ostringstream error;
+ Logger::SetStreams(&info, &error);
+
+ VLOG(0) << "VLOG 0 INFO log message, SHOULD NOT PRINT";
+ VLOG(1) << "VLOG 1 INFO log message, SHOULD NOT PRINT";
+ VLOG(2) << "VLOG 2 INFO log message, SHOULD NOT PRINT";
+
+ EXPECT_EQ("", info.str());
+ EXPECT_EQ("", error.str());
+
+ Logger::SetVerbose(1);
+
+ VLOG(0) << "VLOG 0 INFO log message";
+ VLOG(1) << "VLOG 1 INFO log message";
+ VLOG(2) << "VLOG 2 INFO log message, SHOULD NOT PRINT";
+
+ EXPECT_EQ("INFO: VLOG 0 INFO log message\n"
+ "INFO: VLOG 1 INFO log message\n", info.str());
+ EXPECT_EQ("", error.str());
+ Logger::Reset();
+}
+
+TEST(Debug, VlogIf) {
+ Logger::Reset();
+ std::ostringstream info;
+ std::ostringstream error;
+ Logger::SetStreams(&info, &error);
+
+ VLOG_IF(0, true) << "VLOG 0 INFO log message, SHOULD NOT PRINT";
+ VLOG_IF(1, true) << "VLOG 1 INFO log message, SHOULD NOT PRINT";
+ VLOG_IF(2, true) << "VLOG 2 INFO log message, SHOULD NOT PRINT";
+
+ EXPECT_EQ("", info.str());
+ EXPECT_EQ("", error.str());
+
+ Logger::SetVerbose(1);
+
+ VLOG_IF(0, true) << "VLOG 0 INFO log message";
+ VLOG_IF(0, false) << "VLOG 0 INFO log message, SHOULD NOT PRINT";
+ VLOG_IF(1, true) << "VLOG 1 INFO log message";
+ VLOG_IF(1, false) << "VLOG 1 INFO log message, SHOULD NOT PRINT";
+ VLOG_IF(2, true) << "VLOG 2 INFO log message, SHOULD NOT PRINT";
+ VLOG_IF(2, false) << "VLOG 2 INFO log message, SHOULD NOT PRINT";
+
+ EXPECT_EQ("INFO: VLOG 0 INFO log message\n"
+ "INFO: VLOG 1 INFO log message\n", info.str());
+ EXPECT_EQ("", error.str());
+ Logger::Reset();
+}
+
+TEST(DebugDeathTest, Fatal) {
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+ Logger::Reset();
+ EXPECT_DEATH(LOG(FATAL) << "FATAL log message", "FATAL: FATAL log message");
+ EXPECT_DEATH(
+ LOG_IF(FATAL, true) << "FATAL log message", "FATAL: FATAL log message");
+}
+
+TEST(DebugDeathTest, Check) {
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+ Logger::Reset();
+ CHECK(0 == 0);
+ EXPECT_DEATH(CHECK(0 == 1), "FATAL: .*:.*: .*: CHECK '0 == 1' failed");
+}
+
+TEST(DebugDeathTest, NotReached) {
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+ Logger::Reset();
+ EXPECT_DEATH(NOTREACHED(), "FATAL: .*:.*: .*: NOTREACHED\\(\\) hit");
+}
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/delta_encoder.cc b/tools/relocation_packer/src/delta_encoder.cc
new file mode 100644
index 0000000..8349d7c
--- /dev/null
+++ b/tools/relocation_packer/src/delta_encoder.cc
@@ -0,0 +1,307 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "delta_encoder.h"
+
+#include <vector>
+
+#include "debug.h"
+
+static constexpr uint32_t RELOCATION_GROUPED_BY_INFO_FLAG = 1;
+static constexpr uint32_t RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG = 2;
+static constexpr uint32_t RELOCATION_GROUPED_BY_ADDEND_FLAG = 4;
+static constexpr uint32_t RELOCATION_GROUP_HAS_ADDEND_FLAG = 8;
+
+static bool is_relocation_grouped_by_info(uint64_t flags) {
+ return (flags & RELOCATION_GROUPED_BY_INFO_FLAG) != 0;
+}
+
+static bool is_relocation_grouped_by_offset_delta(uint64_t flags) {
+ return (flags & RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG) != 0;
+}
+
+static bool is_relocation_grouped_by_addend(uint64_t flags) {
+ return (flags & RELOCATION_GROUPED_BY_ADDEND_FLAG) != 0;
+}
+
+static bool is_relocation_group_has_addend(uint64_t flags) {
+ return (flags & RELOCATION_GROUP_HAS_ADDEND_FLAG) != 0;
+}
+
+namespace relocation_packer {
+
+// Encode relocations into a delta encoded (packed) representation.
+template <typename ELF>
+void RelocationDeltaCodec<ELF>::Encode(const std::vector<ElfRela>& relocations,
+ std::vector<ElfAddr>* packed) {
+ if (relocations.size() == 0)
+ return;
+
+ // Start with the relocation count, then append groups
+ // TODO(dimitry): we might want to move it to DT_ANDROID_RELCOUNT section
+ packed->push_back(static_cast<ElfAddr>(relocations.size()));
+
+ // lets write starting offset (offset of the first reloc - first delta)
+ ElfAddr start_offset = relocations.size() > 1 ?
+ relocations[0].r_offset - (relocations[1].r_offset - relocations[0].r_offset) :
+ relocations[0].r_offset;
+
+ packed->push_back(start_offset);
+
+ // this one is used to calculate delta
+ ElfAddr previous_addend = 0;
+ ElfAddr previous_offset = start_offset;
+
+ for (size_t group_start = 0; group_start < relocations.size(); ) {
+ ElfAddr group_flags = 0;
+ ElfAddr group_offset_delta = 0;
+ ElfAddr group_addend = 0;
+ ElfAddr group_info = 0;
+
+ ElfAddr group_size = 0;
+
+ DetectGroup(relocations, group_start, previous_offset, &group_size, &group_flags,
+ &group_offset_delta, &group_info, &group_addend);
+
+ // write the group header
+ packed->push_back(group_size);
+ packed->push_back(group_flags);
+
+ if (is_relocation_grouped_by_offset_delta(group_flags)) {
+ packed->push_back(group_offset_delta);
+ }
+
+ if (is_relocation_grouped_by_info(group_flags)) {
+ packed->push_back(group_info);
+ }
+
+ if (is_relocation_group_has_addend(group_flags) &&
+ is_relocation_grouped_by_addend(group_flags)) {
+ packed->push_back(group_addend - previous_addend);
+ previous_addend = group_addend;
+ }
+
+ for (size_t i = 0; i < static_cast<size_t>(group_size); ++i) {
+ CHECK((group_start + i) < relocations.size());
+ const ElfRela* relocation = &relocations[group_start + i];
+
+ if (!is_relocation_grouped_by_offset_delta(group_flags)) {
+ packed->push_back(relocation->r_offset - previous_offset);
+ }
+ previous_offset = relocation->r_offset;
+
+ if (!is_relocation_grouped_by_info(group_flags)) {
+ packed->push_back(relocation->r_info);
+ }
+
+ if (is_relocation_group_has_addend(group_flags) &&
+ !is_relocation_grouped_by_addend(group_flags)) {
+ packed->push_back(relocation->r_addend - previous_addend);
+ previous_addend = relocation->r_addend;
+ }
+ }
+
+ // If the relocation group does not have an addend - reset it to 0
+ // to simplify addend computation for the group following this one.
+ if (!is_relocation_group_has_addend(group_flags)) {
+ previous_addend = 0;
+ }
+
+ group_start += group_size;
+ }
+}
+
+// Decode relocations from a delta encoded (packed) representation.
+template <typename ELF>
+void RelocationDeltaCodec<ELF>::Decode(const std::vector<ElfAddr>& packed,
+ std::vector<ElfRela>* relocations) {
+ if (packed.size() < 5) {
+ return;
+ }
+
+ size_t ndx = 0;
+ ElfAddr current_count = 0;
+ ElfAddr total_count = packed[ndx++];
+
+ ElfAddr offset = packed[ndx++];
+ ElfAddr info = 0;
+ ElfAddr addend = 0;
+
+ while(current_count < total_count) {
+ // read group
+ ElfAddr group_size = packed[ndx++];
+ ElfAddr group_flags = packed[ndx++];
+ ElfAddr group_offset_delta = 0;
+
+ if (is_relocation_grouped_by_offset_delta(group_flags)) {
+ group_offset_delta = packed[ndx++];
+ }
+
+ if (is_relocation_grouped_by_info(group_flags)) {
+ info = packed[ndx++];
+ }
+
+ if (is_relocation_group_has_addend(group_flags) &&
+ is_relocation_grouped_by_addend(group_flags)) {
+ addend += packed[ndx++];
+ }
+
+ // now read not grouped info
+ for (ElfAddr i = 0; i<group_size; ++i) {
+ if (is_relocation_grouped_by_offset_delta(group_flags)) {
+ offset += group_offset_delta;
+ } else {
+ offset += packed[ndx++];
+ }
+
+ if (!is_relocation_grouped_by_info(group_flags)) {
+ info = packed[ndx++];
+ }
+
+ if (is_relocation_group_has_addend(group_flags) &&
+ !is_relocation_grouped_by_addend(group_flags)) {
+ addend += packed[ndx++];
+ }
+
+ ElfRela reloc;
+ reloc.r_offset = offset;
+ reloc.r_info = info;
+ reloc.r_addend = is_relocation_group_has_addend(group_flags) ? addend : 0;
+ relocations->push_back(reloc);
+ }
+
+ if (!is_relocation_group_has_addend(group_flags)) {
+ addend = 0;
+ }
+
+ current_count += group_size;
+ }
+}
+
+// This function detects a way to group reloc_one and reloc_two, sets up group_flags
+// and initializes values for corresponding group_ fields. For example if relocations
+// can be grouped by r_info the function will set group_info variable.
+template <typename ELF>
+void RelocationDeltaCodec<ELF>::DetectGroupFields(const ElfRela& reloc_one,
+ const ElfRela& reloc_two,
+ ElfAddr current_offset_delta,
+ ElfAddr* group_flags,
+ ElfAddr* group_offset_delta,
+ ElfAddr* group_info,
+ ElfAddr* group_addend) {
+ *group_flags = 0;
+
+ const ElfAddr offset_delta = static_cast<ElfAddr>(reloc_two.r_offset) -
+ static_cast<ElfAddr>(reloc_one.r_offset);
+
+ if (offset_delta == current_offset_delta) {
+ *group_flags |= RELOCATION_GROUPED_BY_OFFSET_DELTA_FLAG;
+ if (group_offset_delta != nullptr) {
+ *group_offset_delta = current_offset_delta;
+ }
+ }
+
+ if (reloc_one.r_info == reloc_two.r_info) {
+ *group_flags |= RELOCATION_GROUPED_BY_INFO_FLAG;
+ if (group_info != nullptr) {
+ *group_info = reloc_one.r_info;
+ }
+ }
+
+ if (reloc_one.r_addend != 0 || reloc_two.r_addend != 0) {
+ *group_flags |= RELOCATION_GROUP_HAS_ADDEND_FLAG;
+ if (reloc_one.r_addend == reloc_two.r_addend) {
+ *group_flags |= RELOCATION_GROUPED_BY_ADDEND_FLAG;
+ if (group_addend != nullptr) {
+ *group_addend = reloc_one.r_addend;
+ }
+ }
+ }
+}
+
+// This function is used to detect if there is better group available
+// during RelocationDeltaCodec<ELF>::DetectGroup processing.
+// Current implementation prefers having groups without addend (== zero addend)
+// to any other groups field with the ratio 3:1. This is because addend tends
+// to be more unevenly distributed than other fields.
+static uint32_t group_weight(uint64_t flags) {
+ uint32_t weight = 0;
+ if (!is_relocation_group_has_addend(flags)) {
+ weight += 3;
+ } else if (is_relocation_grouped_by_addend(flags)) {
+ weight += 1;
+ }
+
+ if (is_relocation_grouped_by_offset_delta(flags)) {
+ weight += 1;
+ }
+
+ if (is_relocation_grouped_by_info(flags)) {
+ weight += 1;
+ }
+
+ return weight;
+}
+
+template <typename ELF>
+void RelocationDeltaCodec<ELF>::DetectGroup(const std::vector<ElfRela>& relocations,
+ size_t group_starts_with, ElfAddr previous_offset,
+ ElfAddr* group_size, ElfAddr* group_flags,
+ ElfAddr* group_offset_delta, ElfAddr* group_info,
+ ElfAddr* group_addend) {
+ CHECK(group_starts_with < relocations.size());
+ CHECK(group_flags != nullptr);
+
+ const ElfRela& reloc_one = relocations[group_starts_with++];
+ if (group_starts_with == relocations.size()) {
+ *group_flags = reloc_one.r_addend == 0 ? 0 : RELOCATION_GROUP_HAS_ADDEND_FLAG;
+ *group_size = 1;
+ return;
+ }
+
+ const ElfAddr offset_delta = reloc_one.r_offset - previous_offset;
+
+ // detect group_flags
+ DetectGroupFields(reloc_one, relocations[group_starts_with], offset_delta, group_flags,
+ group_offset_delta, group_info, group_addend);
+
+ if (group_starts_with + 1 == relocations.size()) {
+ *group_size = 2;
+ return;
+ }
+
+ ElfAddr cnt = 1;
+ for (size_t i = group_starts_with; i < relocations.size() - 1; ++i) {
+ ElfAddr candidate_flags;
+ // check if next group (reloc_current; reloc_next) has better grouped_by flags
+ DetectGroupFields(relocations[i], relocations[i+1], offset_delta, &candidate_flags,
+ nullptr, nullptr, nullptr);
+
+ if (group_weight(*group_flags) < group_weight(candidate_flags)) {
+ break;
+ }
+ cnt++;
+
+ if (candidate_flags != *group_flags) {
+ break;
+ }
+
+ if (i + 1 == relocations.size() - 1) { // last one
+ cnt++;
+ }
+ }
+
+ // if as a result of checking candidates we ended up with cnt == 1
+ // reset flags to the default state
+ if (cnt == 1) {
+ *group_flags = reloc_one.r_addend == 0 ? 0 : RELOCATION_GROUP_HAS_ADDEND_FLAG;
+ }
+
+ *group_size = cnt;
+}
+
+template class RelocationDeltaCodec<ELF32_traits>;
+template class RelocationDeltaCodec<ELF64_traits>;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/delta_encoder.h b/tools/relocation_packer/src/delta_encoder.h
new file mode 100644
index 0000000..46c324c
--- /dev/null
+++ b/tools/relocation_packer/src/delta_encoder.h
@@ -0,0 +1,132 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Delta encode and decode REL/RELA section of elf file.
+//
+// The encoded data format is sequence of elements of ElfAddr type (unsigned long):
+//
+// [00] relocation_count - the total count of relocations
+// [01] initial r_offset - this is initial r_offset for the
+// relocation table.
+// followed by group structures:
+// [02] group
+// ...
+// [nn] group
+
+// the generalized format of the group is (! - always present ? - depends on group_flags):
+// --------------
+// ! group_size
+// ! group_flags
+// ? group_r_offset_delta when RELOCATION_GROUPED_BY_OFFSET_DELTA flag is set
+// ? group_r_info when RELOCATION_GROUPED_BY_INFO flag is set
+// ? group_r_addend_group_delta when RELOCATION_GROUP_HAS_ADDEND and RELOCATION_GROUPED_BY_ADDEND
+// flag is set
+//
+// The group description is followed by individual relocations.
+// please note that there is a case when individual relocation
+// section could be empty - that is if every field ends up grouped.
+//
+// The format for individual relocations section is:
+// ? r_offset_delta - when RELOCATION_GROUPED_BY_OFFSET_DELTA is not set
+// ? r_info - when RELOCATION_GROUPED_BY_INFO flag is not set
+// ? r_addend_delta - RELOCATION_GROUP_HAS_ADDEND is set and RELOCATION_GROUPED_BY_ADDEND is not set
+//
+// For example lets pack the following relocations:
+//
+// Relocation section '.rela.dyn' at offset 0xbf58 contains 939 entries:
+// Offset Info Type Symbol's Value Symbol's Name + Addend
+// 00000000000a2178 0000000000000403 R_AARCH64_RELATIVE 177a8
+// 00000000000a2180 0000000000000403 R_AARCH64_RELATIVE 177cc
+// 00000000000a2188 0000000000000403 R_AARCH64_RELATIVE 177e0
+// 00000000000a2190 0000000000000403 R_AARCH64_RELATIVE 177f4
+// 00000000000a2198 0000000000000403 R_AARCH64_RELATIVE 17804
+// 00000000000a21a0 0000000000000403 R_AARCH64_RELATIVE 17818
+// 00000000000a21a8 0000000000000403 R_AARCH64_RELATIVE 1782c
+// 00000000000a21b0 0000000000000403 R_AARCH64_RELATIVE 17840
+// 00000000000a21b8 0000000000000403 R_AARCH64_RELATIVE 17854
+// 00000000000a21c0 0000000000000403 R_AARCH64_RELATIVE 17868
+// 00000000000a21c8 0000000000000403 R_AARCH64_RELATIVE 1787c
+// 00000000000a21d0 0000000000000403 R_AARCH64_RELATIVE 17890
+// 00000000000a21d8 0000000000000403 R_AARCH64_RELATIVE 178a4
+// 00000000000a21e8 0000000000000403 R_AARCH64_RELATIVE 178b8
+//
+// The header is going to be
+// [00] 14 <- count
+// [01] 0x00000000000a2170 <- initial relocation (first relocation - delta,
+// the delta is 8 in this case)
+// -- starting the first and only group
+// [03] 14 <- group size
+// [03] 0xb <- flags RELOCATION_GROUP_HAS_ADDEND | RELOCATION_GROUPED_BY_OFFSET_DELTA
+// | RELOCATION_GROUPED_BY_INFO
+// [04] 8 <- offset delta
+// [05] 0x403 <- r_info
+// -- end of group definition, starting list of r_addend deltas
+// [06] 0x177a8
+// [07] 0x24 = 177cc - 177a8
+// [08] 0x14 = 177e0 - 177cc
+// [09] 0x14 = 177f4 - 177e0
+// [10] 0x10 = 17804 - 177f4
+// [11] 0x14 = 17818 - 17804
+// [12] 0x14 = 1782c - 17818
+// [13] 0x14 = 17840 - 1782c
+// [14] 0x14 = 17854 - 17840
+// [15] 0x14 = 17868 - 17854
+// [16] 0x14 = 1787c - 17868
+// [17] 0x14 = 17890 - 1787c
+// [18] 0x14 = 178a4 - 17890
+// [19] 0x14 = 178b8 - 178a4
+// -- the end.
+
+// TODO (dimitry): consider using r_addend_group_delta in the way we use group offset delta, it can
+// save us more bytes...
+
+// The input ends when sum(group_size) == relocation_count
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_DELTA_ENCODER_H_
+#define TOOLS_RELOCATION_PACKER_SRC_DELTA_ENCODER_H_
+
+#include <vector>
+
+#include "elf.h"
+#include "elf_traits.h"
+
+namespace relocation_packer {
+
+// A RelocationDeltaCodec packs vectors of relative relocations with
+// addends into more compact forms, and unpacks them to reproduce the
+// pre-packed data.
+template <typename ELF>
+class RelocationDeltaCodec {
+ public:
+ typedef typename ELF::Addr ElfAddr;
+ typedef typename ELF::Rela ElfRela;
+
+ // Encode relocations with addends into a more compact form.
+ // |relocations| is a vector of relative relocation with addend structs.
+ // |packed| is the vector of packed words into which relocations are packed.
+ static void Encode(const std::vector<ElfRela>& relocations,
+ std::vector<ElfAddr>* packed);
+
+ // Decode relative relocations with addends from their more compact form.
+ // |packed| is the vector of packed relocations.
+ // |relocations| is a vector of unpacked relative relocations.
+ static void Decode(const std::vector<ElfAddr>& packed,
+ std::vector<ElfRela>* relocations);
+
+ private:
+ static void DetectGroup(const std::vector<ElfRela>& relocations,
+ size_t group_starts_with, ElfAddr previous_offset,
+ ElfAddr* group_size, ElfAddr* group_flags,
+ ElfAddr* group_offset_delta, ElfAddr* group_info,
+ ElfAddr* group_addend);
+
+ static void DetectGroupFields(const ElfRela& reloc_one, const ElfRela& reloc_two,
+ ElfAddr current_offset_delta, ElfAddr* group_flags,
+ ElfAddr* group_offset_delta, ElfAddr* group_info,
+ ElfAddr* group_addend);
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_DELTA_ENCODER_H_
diff --git a/tools/relocation_packer/src/delta_encoder_unittest.cc b/tools/relocation_packer/src/delta_encoder_unittest.cc
new file mode 100644
index 0000000..06d9c96
--- /dev/null
+++ b/tools/relocation_packer/src/delta_encoder_unittest.cc
@@ -0,0 +1,223 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "delta_encoder.h"
+
+#include <vector>
+#include "elf.h"
+#include "gtest/gtest.h"
+
+namespace {
+
+template <typename T>
+void AddRelocation(uint32_t addr,
+ uint32_t info,
+ int32_t addend,
+ std::vector<T>* relocations) {
+ T relocation;
+ relocation.r_offset = addr;
+ relocation.r_info = info;
+ relocation.r_addend = addend;
+ relocations->push_back(relocation);
+}
+
+template <typename T>
+bool CheckRelocation(uint32_t addr,
+ uint32_t info,
+ int32_t addend,
+ const T& relocation) {
+ return relocation.r_offset == addr &&
+ relocation.r_info == info &&
+ relocation.r_addend == addend;
+}
+
+} // namespace
+
+namespace relocation_packer {
+
+template <typename ELF>
+static void encode() {
+ std::vector<typename ELF::Rela> relocations;
+ std::vector<typename ELF::Addr> packed;
+
+ RelocationDeltaCodec<ELF> codec;
+
+ codec.Encode(relocations, &packed);
+
+ ASSERT_EQ(0U, packed.size());
+
+ // Initial relocation.
+ AddRelocation(0xf00d0000, 11U, 10000, &relocations);
+
+ codec.Encode(relocations, &packed);
+
+ // size of reloc table, size of group, flags, 3 fields, zero
+ EXPECT_EQ(7U, packed.size());
+ // One pair present.
+ size_t ndx = 0;
+ EXPECT_EQ(1U, packed[ndx++]);
+ EXPECT_EQ(0xf00d0000, packed[ndx++]);
+ EXPECT_EQ(1U, packed[ndx++]); // group_size
+ EXPECT_EQ(8U, packed[ndx++]); // flags
+ // Delta from the neutral element is zero
+ EXPECT_EQ(0U, packed[ndx++]); // offset_delta
+ EXPECT_EQ(11U, packed[ndx++]); // info
+ EXPECT_EQ(10000U, packed[ndx++]); // addend_delta
+
+ // Add a second relocation, 4 byte offset delta, 12 byte addend delta.
+ // same info
+ AddRelocation(0xf00d0004, 11U, 10012, &relocations);
+
+ packed.clear();
+ codec.Encode(relocations, &packed);
+
+ ndx = 0;
+ EXPECT_EQ(8U, packed.size());
+
+ EXPECT_EQ(2U, packed[ndx++]); // relocs count
+ EXPECT_EQ(0xf00cfffc, packed[ndx++]); // initial offset
+ EXPECT_EQ(2U, packed[ndx++]); // group count
+ EXPECT_EQ(11U, packed[ndx++]); // flags
+ EXPECT_EQ(4U, packed[ndx++]); // group offset delta
+ EXPECT_EQ(11U, packed[ndx++]); // info
+
+ EXPECT_EQ(10000U, packed[ndx++]); // addend delta
+ EXPECT_EQ(12U, packed[ndx++]); // addend delta
+
+ // Add a third relocation, 4 byte offset delta, 12 byte addend delta.
+ // different info
+ AddRelocation(0xf00d0008, 41U, 10024, &relocations);
+
+ // Add three more relocations, 8 byte offset deltas, -24 byte addend deltas.
+ AddRelocation(0xf00d0010, 42U, 10000, &relocations);
+ AddRelocation(0xf00d0018, 42U, 9976, &relocations);
+ AddRelocation(0xf00d0020, 42U, 9952, &relocations);
+
+ AddRelocation(0xf00d2028, 1042U, 0, &relocations);
+ AddRelocation(0xf00d2030, 3442U, 0, &relocations);
+
+ packed.clear();
+ codec.Encode(relocations, &packed);
+
+ ndx = 0;
+ EXPECT_EQ(26U, packed.size());
+ // Total number of relocs
+ EXPECT_EQ(8U, packed[ndx++]);
+ EXPECT_EQ(0xf00cfffc, packed[ndx++]);
+ // 2 in first group
+ EXPECT_EQ(2U, packed[ndx++]);
+ EXPECT_EQ(11U, packed[ndx++]); //flags
+ EXPECT_EQ(4U, packed[ndx++]); // group offset delta
+ EXPECT_EQ(11U, packed[ndx++]); // info
+
+ // Initial relocation.
+ EXPECT_EQ(10000U, packed[ndx++]); // addend delta
+ // Two relocations, 4 byte offset deltas, 12 byte addend deltas.
+ EXPECT_EQ(12U, packed[ndx++]); // addend delta
+
+ // second group has only one reloc
+ EXPECT_EQ(1U, packed[ndx++]); // count
+ EXPECT_EQ(8U, packed[ndx++]); // flags
+
+ EXPECT_EQ(4U, packed[ndx++]); // offset delta
+ EXPECT_EQ(41U, packed[ndx++]); // info
+ EXPECT_EQ(12U, packed[ndx++]); // addend delta
+
+ // next - 3 relocs grouped by info
+ EXPECT_EQ(3U, packed[ndx++]); // count
+ EXPECT_EQ(11U, packed[ndx++]); // flags
+ EXPECT_EQ(8U, packed[ndx++]); // group offset delta
+ EXPECT_EQ(42U, packed[ndx++]); // info
+ // Three relocations, 8 byte offset deltas, -24 byte addend deltas.
+ EXPECT_EQ(static_cast<typename ELF::Addr>(-24), packed[ndx++]);
+ EXPECT_EQ(static_cast<typename ELF::Addr>(-24), packed[ndx++]);
+ EXPECT_EQ(static_cast<typename ELF::Addr>(-24), packed[ndx++]);
+
+ // and last - 2 relocations without addend
+ EXPECT_EQ(2U, packed[ndx++]);
+ EXPECT_EQ(0U, packed[ndx++]); // flags
+ // offset_deltas and r_infos for next 2 relocations
+ EXPECT_EQ(0x2008U, packed[ndx++]); // offset delta
+ EXPECT_EQ(1042U, packed[ndx++]); // r_info
+ EXPECT_EQ(0x8U, packed[ndx++]); // offset delta
+ EXPECT_EQ(3442U, packed[ndx++]); // r_info
+
+ EXPECT_EQ(packed.size(), ndx);
+}
+
+TEST(Delta, Encode32) {
+ encode<ELF32_traits>();
+}
+
+TEST(Delta, Encode64) {
+ encode<ELF64_traits>();
+}
+
+template <typename ELF>
+static void decode() {
+ std::vector<typename ELF::Addr> packed;
+ std::vector<typename ELF::Rela> relocations;
+
+ RelocationDeltaCodec<ELF> codec;
+ codec.Decode(packed, &relocations);
+
+ EXPECT_EQ(0U, relocations.size());
+
+ // Six pairs.
+ packed.push_back(6U); // count
+ packed.push_back(0xc0ddfffc); // base offset
+ packed.push_back(3U); // group count
+ packed.push_back(11U); // flags
+ packed.push_back(4U); // offset delta
+ packed.push_back(11U); // info
+ // Initial relocation.
+ packed.push_back(10000U);
+ // Two relocations, 4 byte offset deltas, 12 byte addend deltas.
+ packed.push_back(12U); // addend
+ packed.push_back(12U); // addend
+
+ // Three relocations, 8 byte offset deltas, -24 byte addend deltas.
+ packed.push_back(1U); // group count
+ packed.push_back(9U); // flags
+ packed.push_back(11U); // info
+
+ packed.push_back(8U);
+ packed.push_back(static_cast<typename ELF::Addr>(-24));
+ // next group with 2 relocs
+ packed.push_back(2U); // group count
+ packed.push_back(11U); // flags
+ packed.push_back(8U); // offset
+ packed.push_back(42U); // info
+
+ packed.push_back(static_cast<typename ELF::Addr>(-24)); // addend
+ packed.push_back(static_cast<typename ELF::Addr>(-24)); // addend
+
+ relocations.clear();
+ codec.Decode(packed, &relocations);
+
+ EXPECT_EQ(6U, relocations.size());
+ // Initial relocation.
+ EXPECT_TRUE(CheckRelocation(0xc0de0000, 11U, 10000, relocations[0]));
+ // Two relocations, 4 byte offset deltas, 12 byte addend deltas.
+ EXPECT_TRUE(CheckRelocation(0xc0de0004, 11U, 10012, relocations[1]));
+ EXPECT_TRUE(CheckRelocation(0xc0de0008, 11U, 10024, relocations[2]));
+ // Three relocations, 8 byte offset deltas, -24 byte addend deltas.
+ EXPECT_TRUE(CheckRelocation(0xc0de0010, 11U, 10000, relocations[3]));
+ EXPECT_TRUE(CheckRelocation(0xc0de0018, 42U, 9976, relocations[4]));
+ EXPECT_TRUE(CheckRelocation(0xc0de0020, 42U, 9952, relocations[5]));
+}
+
+TEST(Delta, Decode32) {
+ decode<ELF32_traits>();
+}
+
+TEST(Delta, Decode64) {
+ decode<ELF64_traits>();
+}
+
+// TODO (dimitry): add more tests (fix by 19 January 2038 03:14:07 UTC)
+// TODO (dimtiry): 1. Incorrect packed array for decode
+// TODO (dimtiry): 2. Try to catch situation where it is likely to get series of groups with size 1
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/elf_file.cc b/tools/relocation_packer/src/elf_file.cc
new file mode 100644
index 0000000..20b25ef
--- /dev/null
+++ b/tools/relocation_packer/src/elf_file.cc
@@ -0,0 +1,882 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Implementation notes:
+//
+// We need to remove a piece from the ELF shared library. However, we also
+// want to avoid fixing DWARF cfi data and relative relocation addresses.
+// So after packing we shift offets and starting address of the RX segment
+// while preserving code/data vaddrs location.
+// This requires some fixups for symtab/hash/gnu_hash dynamic section addresses.
+
+#include "elf_file.h"
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <algorithm>
+#include <string>
+#include <vector>
+
+#include "debug.h"
+#include "elf_traits.h"
+#include "libelf.h"
+#include "packer.h"
+
+namespace relocation_packer {
+
+// Out-of-band dynamic tags used to indicate the offset and size of the
+// android packed relocations section.
+static constexpr int32_t DT_ANDROID_REL = DT_LOOS + 2;
+static constexpr int32_t DT_ANDROID_RELSZ = DT_LOOS + 3;
+
+static constexpr int32_t DT_ANDROID_RELA = DT_LOOS + 4;
+static constexpr int32_t DT_ANDROID_RELASZ = DT_LOOS + 5;
+
+static constexpr uint32_t SHT_ANDROID_REL = SHT_LOOS + 1;
+static constexpr uint32_t SHT_ANDROID_RELA = SHT_LOOS + 2;
+
+// Alignment to preserve, in bytes. This must be at least as large as the
+// largest d_align and sh_addralign values found in the loaded file.
+// Out of caution for RELRO page alignment, we preserve to a complete target
+// page. See http://www.airs.com/blog/archives/189.
+static constexpr size_t kPreserveAlignment = 4096;
+
+// Get section data. Checks that the section has exactly one data entry,
+// so that the section size and the data size are the same. True in
+// practice for all sections we resize when packing or unpacking. Done
+// by ensuring that a call to elf_getdata(section, data) returns NULL as
+// the next data entry.
+static Elf_Data* GetSectionData(Elf_Scn* section) {
+ Elf_Data* data = elf_getdata(section, NULL);
+ CHECK(data && elf_getdata(section, data) == NULL);
+ return data;
+}
+
+// Rewrite section data. Allocates new data and makes it the data element's
+// buffer. Relies on program exit to free allocated data.
+static void RewriteSectionData(Elf_Scn* section,
+ const void* section_data,
+ size_t size) {
+ Elf_Data* data = GetSectionData(section);
+ CHECK(size == data->d_size);
+ uint8_t* area = new uint8_t[size];
+ memcpy(area, section_data, size);
+ data->d_buf = area;
+}
+
+// Verbose ELF header logging.
+template <typename Ehdr>
+static void VerboseLogElfHeader(const Ehdr* elf_header) {
+ VLOG(1) << "e_phoff = " << elf_header->e_phoff;
+ VLOG(1) << "e_shoff = " << elf_header->e_shoff;
+ VLOG(1) << "e_ehsize = " << elf_header->e_ehsize;
+ VLOG(1) << "e_phentsize = " << elf_header->e_phentsize;
+ VLOG(1) << "e_phnum = " << elf_header->e_phnum;
+ VLOG(1) << "e_shnum = " << elf_header->e_shnum;
+ VLOG(1) << "e_shstrndx = " << elf_header->e_shstrndx;
+}
+
+// Verbose ELF program header logging.
+template <typename Phdr>
+static void VerboseLogProgramHeader(size_t program_header_index,
+ const Phdr* program_header) {
+ std::string type;
+ switch (program_header->p_type) {
+ case PT_NULL: type = "NULL"; break;
+ case PT_LOAD: type = "LOAD"; break;
+ case PT_DYNAMIC: type = "DYNAMIC"; break;
+ case PT_INTERP: type = "INTERP"; break;
+ case PT_PHDR: type = "PHDR"; break;
+ case PT_GNU_RELRO: type = "GNU_RELRO"; break;
+ case PT_GNU_STACK: type = "GNU_STACK"; break;
+ case PT_ARM_EXIDX: type = "EXIDX"; break;
+ default: type = "(OTHER)"; break;
+ }
+ VLOG(1) << "phdr[" << program_header_index << "] : " << type;
+ VLOG(1) << " p_offset = " << program_header->p_offset;
+ VLOG(1) << " p_vaddr = " << program_header->p_vaddr;
+ VLOG(1) << " p_paddr = " << program_header->p_paddr;
+ VLOG(1) << " p_filesz = " << program_header->p_filesz;
+ VLOG(1) << " p_memsz = " << program_header->p_memsz;
+ VLOG(1) << " p_flags = " << program_header->p_flags;
+ VLOG(1) << " p_align = " << program_header->p_align;
+}
+
+// Verbose ELF section header logging.
+template <typename Shdr>
+static void VerboseLogSectionHeader(const std::string& section_name,
+ const Shdr* section_header) {
+ VLOG(1) << "section " << section_name;
+ VLOG(1) << " sh_addr = " << section_header->sh_addr;
+ VLOG(1) << " sh_offset = " << section_header->sh_offset;
+ VLOG(1) << " sh_size = " << section_header->sh_size;
+ VLOG(1) << " sh_entsize = " << section_header->sh_entsize;
+ VLOG(1) << " sh_addralign = " << section_header->sh_addralign;
+}
+
+// Verbose ELF section data logging.
+static void VerboseLogSectionData(const Elf_Data* data) {
+ VLOG(1) << " data";
+ VLOG(1) << " d_buf = " << data->d_buf;
+ VLOG(1) << " d_off = " << data->d_off;
+ VLOG(1) << " d_size = " << data->d_size;
+ VLOG(1) << " d_align = " << data->d_align;
+}
+
+// Load the complete ELF file into a memory image in libelf, and identify
+// the .rel.dyn or .rela.dyn, .dynamic, and .android.rel.dyn or
+// .android.rela.dyn sections. No-op if the ELF file has already been loaded.
+template <typename ELF>
+bool ElfFile<ELF>::Load() {
+ if (elf_)
+ return true;
+
+ Elf* elf = elf_begin(fd_, ELF_C_RDWR, NULL);
+ CHECK(elf);
+
+ if (elf_kind(elf) != ELF_K_ELF) {
+ LOG(ERROR) << "File not in ELF format";
+ return false;
+ }
+
+ auto elf_header = ELF::getehdr(elf);
+ if (!elf_header) {
+ LOG(ERROR) << "Failed to load ELF header: " << elf_errmsg(elf_errno());
+ return false;
+ }
+
+ if (elf_header->e_type != ET_DYN) {
+ LOG(ERROR) << "ELF file is not a shared object";
+ return false;
+ }
+
+ // Require that our endianness matches that of the target, and that both
+ // are little-endian. Safe for all current build/target combinations.
+ const int endian = elf_header->e_ident[EI_DATA];
+ CHECK(endian == ELFDATA2LSB);
+ CHECK(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__);
+
+ const int file_class = elf_header->e_ident[EI_CLASS];
+ VLOG(1) << "endian = " << endian << ", file class = " << file_class;
+ VerboseLogElfHeader(elf_header);
+
+ auto elf_program_header = ELF::getphdr(elf);
+ CHECK(elf_program_header != nullptr);
+
+ const typename ELF::Phdr* dynamic_program_header = NULL;
+ for (size_t i = 0; i < elf_header->e_phnum; ++i) {
+ auto program_header = &elf_program_header[i];
+ VerboseLogProgramHeader(i, program_header);
+
+ if (program_header->p_type == PT_DYNAMIC) {
+ CHECK(dynamic_program_header == NULL);
+ dynamic_program_header = program_header;
+ }
+ }
+ CHECK(dynamic_program_header != nullptr);
+
+ size_t string_index;
+ elf_getshdrstrndx(elf, &string_index);
+
+ // Notes of the dynamic relocations, packed relocations, and .dynamic
+ // sections. Found while iterating sections, and later stored in class
+ // attributes.
+ Elf_Scn* found_relocations_section = nullptr;
+ Elf_Scn* found_dynamic_section = nullptr;
+
+ // Notes of relocation section types seen. We require one or the other of
+ // these; both is unsupported.
+ bool has_rel_relocations = false;
+ bool has_rela_relocations = false;
+
+ Elf_Scn* section = NULL;
+ while ((section = elf_nextscn(elf, section)) != nullptr) {
+ auto section_header = ELF::getshdr(section);
+ std::string name = elf_strptr(elf, string_index, section_header->sh_name);
+ VerboseLogSectionHeader(name, section_header);
+
+ // Note relocation section types.
+ if (section_header->sh_type == SHT_REL || section_header->sh_type == SHT_ANDROID_REL) {
+ has_rel_relocations = true;
+ }
+ if (section_header->sh_type == SHT_RELA || section_header->sh_type == SHT_ANDROID_RELA) {
+ has_rela_relocations = true;
+ }
+
+ // Note special sections as we encounter them.
+ if ((name == ".rel.dyn" || name == ".rela.dyn") &&
+ section_header->sh_size > 0) {
+ found_relocations_section = section;
+ }
+
+ if (section_header->sh_offset == dynamic_program_header->p_offset) {
+ found_dynamic_section = section;
+ }
+
+ // Ensure we preserve alignment, repeated later for the data block(s).
+ CHECK(section_header->sh_addralign <= kPreserveAlignment);
+
+ Elf_Data* data = NULL;
+ while ((data = elf_getdata(section, data)) != NULL) {
+ CHECK(data->d_align <= kPreserveAlignment);
+ VerboseLogSectionData(data);
+ }
+ }
+
+ // Loading failed if we did not find the required special sections.
+ if (!found_relocations_section) {
+ LOG(ERROR) << "Missing or empty .rel.dyn or .rela.dyn section";
+ return false;
+ }
+ if (!found_dynamic_section) {
+ LOG(ERROR) << "Missing .dynamic section";
+ return false;
+ }
+
+ // Loading failed if we could not identify the relocations type.
+ if (!has_rel_relocations && !has_rela_relocations) {
+ LOG(ERROR) << "No relocations sections found";
+ return false;
+ }
+ if (has_rel_relocations && has_rela_relocations) {
+ LOG(ERROR) << "Multiple relocations sections with different types found, "
+ << "not currently supported";
+ return false;
+ }
+
+ elf_ = elf;
+ relocations_section_ = found_relocations_section;
+ dynamic_section_ = found_dynamic_section;
+ relocations_type_ = has_rel_relocations ? REL : RELA;
+ return true;
+}
+
+// Helper for ResizeSection(). Adjust the main ELF header for the hole.
+template <typename ELF>
+static void AdjustElfHeaderForHole(typename ELF::Ehdr* elf_header,
+ typename ELF::Off hole_start,
+ ssize_t hole_size) {
+ if (elf_header->e_phoff > hole_start) {
+ elf_header->e_phoff += hole_size;
+ VLOG(1) << "e_phoff adjusted to " << elf_header->e_phoff;
+ }
+ if (elf_header->e_shoff > hole_start) {
+ elf_header->e_shoff += hole_size;
+ VLOG(1) << "e_shoff adjusted to " << elf_header->e_shoff;
+ }
+}
+
+// Helper for ResizeSection(). Adjust all section headers for the hole.
+template <typename ELF>
+static void AdjustSectionHeadersForHole(Elf* elf,
+ typename ELF::Off hole_start,
+ ssize_t hole_size) {
+ size_t string_index;
+ elf_getshdrstrndx(elf, &string_index);
+
+ Elf_Scn* section = NULL;
+ while ((section = elf_nextscn(elf, section)) != NULL) {
+ auto section_header = ELF::getshdr(section);
+ std::string name = elf_strptr(elf, string_index, section_header->sh_name);
+
+ if (section_header->sh_offset > hole_start) {
+ section_header->sh_offset += hole_size;
+ VLOG(1) << "section " << name
+ << " sh_offset adjusted to " << section_header->sh_offset;
+ } else {
+ section_header->sh_addr -= hole_size;
+ VLOG(1) << "section " << name
+ << " sh_addr adjusted to " << section_header->sh_addr;
+ }
+ }
+}
+
+// Helper for ResizeSection(). Adjust the offsets of any program headers
+// that have offsets currently beyond the hole start.
+template <typename ELF>
+static void AdjustProgramHeaderOffsets(typename ELF::Phdr* program_headers,
+ size_t count,
+ typename ELF::Off hole_start,
+ ssize_t hole_size) {
+ for (size_t i = 0; i < count; ++i) {
+ typename ELF::Phdr* program_header = &program_headers[i];
+
+ if (program_header->p_offset > hole_start) {
+ // The hole start is past this segment, so adjust offset.
+ program_header->p_offset += hole_size;
+ VLOG(1) << "phdr[" << i
+ << "] p_offset adjusted to "<< program_header->p_offset;
+ } else {
+ program_header->p_vaddr -= hole_size;
+ program_header->p_paddr -= hole_size;
+ VLOG(1) << "phdr[" << i
+ << "] p_vaddr adjusted to "<< program_header->p_vaddr
+ << "; p_paddr adjusted to "<< program_header->p_paddr;
+ }
+ }
+}
+
+// Helper for ResizeSection(). Find the first loadable segment in the
+// file. We expect it to map from file offset zero.
+template <typename ELF>
+static typename ELF::Phdr* FindLoadSegmentForHole(typename ELF::Phdr* program_headers,
+ size_t count,
+ typename ELF::Off hole_start) {
+ for (size_t i = 0; i < count; ++i) {
+ typename ELF::Phdr* program_header = &program_headers[i];
+
+ if (program_header->p_type == PT_LOAD &&
+ program_header->p_offset <= hole_start &&
+ (program_header->p_offset + program_header->p_filesz) >= hole_start ) {
+ return program_header;
+ }
+ }
+ LOG(FATAL) << "Cannot locate a LOAD segment with hole_start=0x" << std::hex << hole_start;
+ NOTREACHED();
+
+ return nullptr;
+}
+
+// Helper for ResizeSection(). Rewrite program headers.
+template <typename ELF>
+static void RewriteProgramHeadersForHole(Elf* elf,
+ typename ELF::Off hole_start,
+ ssize_t hole_size) {
+ const typename ELF::Ehdr* elf_header = ELF::getehdr(elf);
+ CHECK(elf_header);
+
+ typename ELF::Phdr* elf_program_header = ELF::getphdr(elf);
+ CHECK(elf_program_header);
+
+ const size_t program_header_count = elf_header->e_phnum;
+
+ // Locate the segment that we can overwrite to form the new LOAD entry,
+ // and the segment that we are going to split into two parts.
+ typename ELF::Phdr* target_load_header =
+ FindLoadSegmentForHole<ELF>(elf_program_header, program_header_count, hole_start);
+
+ VLOG(1) << "phdr[" << target_load_header - elf_program_header << "] adjust";
+ // Adjust PT_LOAD program header memsz and filesz
+ target_load_header->p_filesz += hole_size;
+ target_load_header->p_memsz += hole_size;
+
+ // Adjust the offsets and p_vaddrs
+ AdjustProgramHeaderOffsets<ELF>(elf_program_header,
+ program_header_count,
+ hole_start,
+ hole_size);
+}
+
+// Helper for ResizeSection(). Locate and return the dynamic section.
+template <typename ELF>
+static Elf_Scn* GetDynamicSection(Elf* elf) {
+ const typename ELF::Ehdr* elf_header = ELF::getehdr(elf);
+ CHECK(elf_header);
+
+ const typename ELF::Phdr* elf_program_header = ELF::getphdr(elf);
+ CHECK(elf_program_header);
+
+ // Find the program header that describes the dynamic section.
+ const typename ELF::Phdr* dynamic_program_header = NULL;
+ for (size_t i = 0; i < elf_header->e_phnum; ++i) {
+ const typename ELF::Phdr* program_header = &elf_program_header[i];
+
+ if (program_header->p_type == PT_DYNAMIC) {
+ dynamic_program_header = program_header;
+ }
+ }
+ CHECK(dynamic_program_header);
+
+ // Now find the section with the same offset as this program header.
+ Elf_Scn* dynamic_section = NULL;
+ Elf_Scn* section = NULL;
+ while ((section = elf_nextscn(elf, section)) != NULL) {
+ typename ELF::Shdr* section_header = ELF::getshdr(section);
+
+ if (section_header->sh_offset == dynamic_program_header->p_offset) {
+ dynamic_section = section;
+ }
+ }
+ CHECK(dynamic_section != NULL);
+
+ return dynamic_section;
+}
+
+// Helper for ResizeSection(). Adjust the .dynamic section for the hole.
+template <typename ELF>
+void ElfFile<ELF>::AdjustDynamicSectionForHole(Elf_Scn* dynamic_section,
+ typename ELF::Off hole_start,
+ ssize_t hole_size,
+ relocations_type_t relocations_type) {
+ CHECK(relocations_type != NONE);
+ Elf_Data* data = GetSectionData(dynamic_section);
+
+ auto dynamic_base = reinterpret_cast<typename ELF::Dyn*>(data->d_buf);
+ std::vector<typename ELF::Dyn> dynamics(
+ dynamic_base,
+ dynamic_base + data->d_size / sizeof(dynamics[0]));
+
+ if (hole_size > 0) { // expanding
+ hole_start += hole_size;
+ }
+
+ for (size_t i = 0; i < dynamics.size(); ++i) {
+ typename ELF::Dyn* dynamic = &dynamics[i];
+ const typename ELF::Sword tag = dynamic->d_tag;
+
+ // Any tags that hold offsets are adjustment candidates.
+ const bool is_adjustable = (tag == DT_PLTGOT ||
+ tag == DT_HASH ||
+ tag == DT_GNU_HASH ||
+ tag == DT_STRTAB ||
+ tag == DT_SYMTAB ||
+ tag == DT_RELA ||
+ tag == DT_INIT ||
+ tag == DT_FINI ||
+ tag == DT_REL ||
+ tag == DT_JMPREL ||
+ tag == DT_INIT_ARRAY ||
+ tag == DT_FINI_ARRAY ||
+ tag == DT_ANDROID_REL||
+ tag == DT_ANDROID_RELA);
+
+ if (is_adjustable && dynamic->d_un.d_ptr <= hole_start) {
+ dynamic->d_un.d_ptr -= hole_size;
+ VLOG(1) << "dynamic[" << i << "] " << dynamic->d_tag
+ << " d_ptr adjusted to " << dynamic->d_un.d_ptr;
+ }
+
+ // DT_RELSZ or DT_RELASZ indicate the overall size of relocations.
+ // Only one will be present. Adjust by hole size.
+ if (tag == DT_RELSZ || tag == DT_RELASZ || tag == DT_ANDROID_RELSZ || tag == DT_ANDROID_RELASZ) {
+ dynamic->d_un.d_val += hole_size;
+ VLOG(1) << "dynamic[" << i << "] " << dynamic->d_tag
+ << " d_val adjusted to " << dynamic->d_un.d_val;
+ }
+
+ // Ignore DT_RELCOUNT and DT_RELACOUNT: (1) nobody uses them and
+ // technically (2) the relative relocation count is not changed.
+
+ // DT_RELENT and DT_RELAENT don't change, ignore them as well.
+ }
+
+ void* section_data = &dynamics[0];
+ size_t bytes = dynamics.size() * sizeof(dynamics[0]);
+ RewriteSectionData(dynamic_section, section_data, bytes);
+}
+
+// Resize a section. If the new size is larger than the current size, open
+// up a hole by increasing file offsets that come after the hole. If smaller
+// than the current size, remove the hole by decreasing those offsets.
+template <typename ELF>
+void ElfFile<ELF>::ResizeSection(Elf* elf, Elf_Scn* section, size_t new_size,
+ typename ELF::Word new_sh_type,
+ relocations_type_t relocations_type) {
+
+ size_t string_index;
+ elf_getshdrstrndx(elf, &string_index);
+ auto section_header = ELF::getshdr(section);
+ std::string name = elf_strptr(elf, string_index, section_header->sh_name);
+
+ if (section_header->sh_size == new_size) {
+ return;
+ }
+
+ // Require that the section size and the data size are the same. True
+ // in practice for all sections we resize when packing or unpacking.
+ Elf_Data* data = GetSectionData(section);
+ CHECK(data->d_off == 0 && data->d_size == section_header->sh_size);
+
+ // Require that the section is not zero-length (that is, has allocated
+ // data that we can validly expand).
+ CHECK(data->d_size && data->d_buf);
+
+ const auto hole_start = section_header->sh_offset;
+ const ssize_t hole_size = new_size - data->d_size;
+
+ VLOG_IF(1, (hole_size > 0)) << "expand section (" << name << ") size: " <<
+ data->d_size << " -> " << (data->d_size + hole_size);
+ VLOG_IF(1, (hole_size < 0)) << "shrink section (" << name << ") size: " <<
+ data->d_size << " -> " << (data->d_size + hole_size);
+
+ // libelf overrides sh_entsize for known sh_types, so it does not matter what we set
+ // for SHT_REL/SHT_RELA.
+ typename ELF::Xword new_entsize =
+ (new_sh_type == SHT_ANDROID_REL || new_sh_type == SHT_ANDROID_RELA) ? 1 : 0;
+
+ VLOG(1) << "Update section (" << name << ") entry size: " <<
+ section_header->sh_entsize << " -> " << new_entsize;
+
+ // Resize the data and the section header.
+ data->d_size += hole_size;
+ section_header->sh_size += hole_size;
+ section_header->sh_entsize = new_entsize;
+ section_header->sh_type = new_sh_type;
+
+ // Add the hole size to all offsets in the ELF file that are after the
+ // start of the hole. If the hole size is positive we are expanding the
+ // section to create a new hole; if negative, we are closing up a hole.
+
+ // Start with the main ELF header.
+ typename ELF::Ehdr* elf_header = ELF::getehdr(elf);
+ AdjustElfHeaderForHole<ELF>(elf_header, hole_start, hole_size);
+
+ // Adjust all section headers.
+ AdjustSectionHeadersForHole<ELF>(elf, hole_start, hole_size);
+
+ // Rewrite the program headers to either split or coalesce segments,
+ // and adjust dynamic entries to match.
+ RewriteProgramHeadersForHole<ELF>(elf, hole_start, hole_size);
+
+ Elf_Scn* dynamic_section = GetDynamicSection<ELF>(elf);
+ AdjustDynamicSectionForHole(dynamic_section, hole_start, hole_size, relocations_type);
+}
+
+// Find the first slot in a dynamics array with the given tag. The array
+// always ends with a free (unused) element, and which we exclude from the
+// search. Returns dynamics->size() if not found.
+template <typename ELF>
+static size_t FindDynamicEntry(typename ELF::Sword tag,
+ std::vector<typename ELF::Dyn>* dynamics) {
+ // Loop until the penultimate entry. We exclude the end sentinel.
+ for (size_t i = 0; i < dynamics->size() - 1; ++i) {
+ if (dynamics->at(i).d_tag == tag) {
+ return i;
+ }
+ }
+
+ // The tag was not found.
+ return dynamics->size();
+}
+
+// Replace dynamic entry.
+template <typename ELF>
+static void ReplaceDynamicEntry(typename ELF::Sword tag,
+ const typename ELF::Dyn& dyn,
+ std::vector<typename ELF::Dyn>* dynamics) {
+ const size_t slot = FindDynamicEntry<ELF>(tag, dynamics);
+ if (slot == dynamics->size()) {
+ LOG(FATAL) << "Dynamic slot is not found for tag=" << tag;
+ }
+
+ // Replace this entry with the one supplied.
+ dynamics->at(slot) = dyn;
+ VLOG(1) << "dynamic[" << slot << "] overwritten with " << dyn.d_tag;
+}
+
+// Remove relative entries from dynamic relocations and write as packed
+// data into android packed relocations.
+template <typename ELF>
+bool ElfFile<ELF>::PackRelocations() {
+ // Load the ELF file into libelf.
+ if (!Load()) {
+ LOG(ERROR) << "Failed to load as ELF";
+ return false;
+ }
+
+ // Retrieve the current dynamic relocations section data.
+ Elf_Data* data = GetSectionData(relocations_section_);
+ // we always pack rela, because packed format is pretty much the same
+ std::vector<typename ELF::Rela> relocations;
+
+ if (relocations_type_ == REL) {
+ // Convert data to a vector of relocations.
+ const typename ELF::Rel* relocations_base = reinterpret_cast<typename ELF::Rel*>(data->d_buf);
+ ConvertRelArrayToRelaVector(relocations_base,
+ data->d_size / sizeof(typename ELF::Rel), &relocations);
+ LOG(INFO) << "Relocations : REL";
+ } else if (relocations_type_ == RELA) {
+ // Convert data to a vector of relocations with addends.
+ const typename ELF::Rela* relocations_base = reinterpret_cast<typename ELF::Rela*>(data->d_buf);
+ relocations = std::vector<typename ELF::Rela>(
+ relocations_base,
+ relocations_base + data->d_size / sizeof(relocations[0]));
+
+ LOG(INFO) << "Relocations : RELA";
+ } else {
+ NOTREACHED();
+ }
+
+ return PackTypedRelocations(&relocations);
+}
+
+// Helper for PackRelocations(). Rel type is one of ELF::Rel or ELF::Rela.
+template <typename ELF>
+bool ElfFile<ELF>::PackTypedRelocations(std::vector<typename ELF::Rela>* relocations) {
+ typedef typename ELF::Rela Rela;
+
+ // If no relocations then we have nothing packable. Perhaps
+ // the shared object has already been packed?
+ if (relocations->empty()) {
+ LOG(ERROR) << "No relocations found (already packed?)";
+ return false;
+ }
+
+ const size_t rel_size =
+ relocations_type_ == RELA ? sizeof(typename ELF::Rela) : sizeof(typename ELF::Rel);
+ const size_t initial_bytes = relocations->size() * rel_size;
+
+ LOG(INFO) << "Unpacked : " << initial_bytes << " bytes";
+ std::vector<uint8_t> packed;
+ RelocationPacker<ELF> packer;
+
+ // Pack relocations: dry run to estimate memory savings.
+ packer.PackRelocations(*relocations, &packed);
+ const size_t packed_bytes_estimate = packed.size() * sizeof(packed[0]);
+ LOG(INFO) << "Packed (no padding): " << packed_bytes_estimate << " bytes";
+
+ if (packed.empty()) {
+ LOG(INFO) << "Too few relocations to pack";
+ return false;
+ }
+
+ // Pre-calculate the size of the hole we will close up when we rewrite
+ // dynamic relocations. We have to adjust relocation addresses to
+ // account for this.
+ typename ELF::Shdr* section_header = ELF::getshdr(relocations_section_);
+ ssize_t hole_size = initial_bytes - packed_bytes_estimate;
+
+ // hole_size needs to be page_aligned.
+ hole_size -= hole_size % kPreserveAlignment;
+
+ LOG(INFO) << "Compaction : " << hole_size << " bytes";
+
+ // Adjusting for alignment may have removed any packing benefit.
+ if (hole_size == 0) {
+ LOG(INFO) << "Too few relocations to pack after alignment";
+ return false;
+ }
+
+ if (hole_size <= 0) {
+ LOG(INFO) << "Packing relocations saves no space";
+ return false;
+ }
+
+ size_t data_padding_bytes = is_padding_relocations_ ?
+ initial_bytes - packed_bytes_estimate :
+ initial_bytes - hole_size - packed_bytes_estimate;
+
+ // pad data
+ std::vector<uint8_t> padding(data_padding_bytes, 0);
+ packed.insert(packed.end(), padding.begin(), padding.end());
+
+ const void* packed_data = &packed[0];
+
+ // Run a loopback self-test as a check that packing is lossless.
+ std::vector<Rela> unpacked;
+ packer.UnpackRelocations(packed, &unpacked);
+ CHECK(unpacked.size() == relocations->size());
+ CHECK(!memcmp(&unpacked[0],
+ &relocations->at(0),
+ unpacked.size() * sizeof(unpacked[0])));
+
+ // Rewrite the current dynamic relocations section with packed one then shrink it to size.
+ const size_t bytes = packed.size() * sizeof(packed[0]);
+ ResizeSection(elf_, relocations_section_, bytes,
+ relocations_type_ == REL ? SHT_ANDROID_REL : SHT_ANDROID_RELA, relocations_type_);
+ RewriteSectionData(relocations_section_, packed_data, bytes);
+
+ // TODO (dimitry): fix string table and replace .rel.dyn/plt with .android.rel.dyn/plt
+
+ // Rewrite .dynamic and rename relocation tags describing the packed android
+ // relocations.
+ Elf_Data* data = GetSectionData(dynamic_section_);
+ const typename ELF::Dyn* dynamic_base = reinterpret_cast<typename ELF::Dyn*>(data->d_buf);
+ std::vector<typename ELF::Dyn> dynamics(
+ dynamic_base,
+ dynamic_base + data->d_size / sizeof(dynamics[0]));
+ section_header = ELF::getshdr(relocations_section_);
+ {
+ typename ELF::Dyn dyn;
+ dyn.d_tag = relocations_type_ == REL ? DT_ANDROID_REL : DT_ANDROID_RELA;
+ dyn.d_un.d_ptr = section_header->sh_addr;
+ ReplaceDynamicEntry<ELF>(relocations_type_ == REL ? DT_REL : DT_RELA, dyn, &dynamics);
+ }
+ {
+ typename ELF::Dyn dyn;
+ dyn.d_tag = relocations_type_ == REL ? DT_ANDROID_RELSZ : DT_ANDROID_RELASZ;
+ dyn.d_un.d_val = section_header->sh_size;
+ ReplaceDynamicEntry<ELF>(relocations_type_ == REL ? DT_RELSZ : DT_RELASZ, dyn, &dynamics);
+ }
+
+ const void* dynamics_data = &dynamics[0];
+ const size_t dynamics_bytes = dynamics.size() * sizeof(dynamics[0]);
+ RewriteSectionData(dynamic_section_, dynamics_data, dynamics_bytes);
+
+ Flush();
+ return true;
+}
+
+// Find packed relative relocations in the packed android relocations
+// section, unpack them, and rewrite the dynamic relocations section to
+// contain unpacked data.
+template <typename ELF>
+bool ElfFile<ELF>::UnpackRelocations() {
+ // Load the ELF file into libelf.
+ if (!Load()) {
+ LOG(ERROR) << "Failed to load as ELF";
+ return false;
+ }
+
+ typename ELF::Shdr* section_header = ELF::getshdr(relocations_section_);
+ // Retrieve the current packed android relocations section data.
+ Elf_Data* data = GetSectionData(relocations_section_);
+
+ // Convert data to a vector of bytes.
+ const uint8_t* packed_base = reinterpret_cast<uint8_t*>(data->d_buf);
+ std::vector<uint8_t> packed(
+ packed_base,
+ packed_base + data->d_size / sizeof(packed[0]));
+
+ if ((section_header->sh_type == SHT_ANDROID_RELA || section_header->sh_type == SHT_ANDROID_REL) &&
+ packed.size() > 3 &&
+ packed[0] == 'A' &&
+ packed[1] == 'P' &&
+ (packed[2] == 'U' || packed[2] == 'S') &&
+ packed[3] == '2') {
+ LOG(INFO) << "Relocations : " << (relocations_type_ == REL ? "REL" : "RELA");
+ } else {
+ LOG(ERROR) << "Packed relocations not found (not packed?)";
+ return false;
+ }
+
+ return UnpackTypedRelocations(packed);
+}
+
+// Helper for UnpackRelocations(). Rel type is one of ELF::Rel or ELF::Rela.
+template <typename ELF>
+bool ElfFile<ELF>::UnpackTypedRelocations(const std::vector<uint8_t>& packed) {
+ // Unpack the data to re-materialize the relative relocations.
+ const size_t packed_bytes = packed.size() * sizeof(packed[0]);
+ LOG(INFO) << "Packed : " << packed_bytes << " bytes";
+ std::vector<typename ELF::Rela> unpacked_relocations;
+ RelocationPacker<ELF> packer;
+ packer.UnpackRelocations(packed, &unpacked_relocations);
+
+ const size_t relocation_entry_size =
+ relocations_type_ == REL ? sizeof(typename ELF::Rel) : sizeof(typename ELF::Rela);
+ const size_t unpacked_bytes = unpacked_relocations.size() * relocation_entry_size;
+ LOG(INFO) << "Unpacked : " << unpacked_bytes << " bytes";
+
+ // Retrieve the current dynamic relocations section data.
+ Elf_Data* data = GetSectionData(relocations_section_);
+
+ LOG(INFO) << "Relocations : " << unpacked_relocations.size() << " entries";
+
+ // If we found the same number of null relocation entries in the dynamic
+ // relocations section as we hold as unpacked relative relocations, then
+ // this is a padded file.
+
+ const bool is_padded = packed_bytes == unpacked_bytes;
+
+ // Unless padded, pre-apply relative relocations to account for the
+ // hole, and pre-adjust all relocation offsets accordingly.
+ typename ELF::Shdr* section_header = ELF::getshdr(relocations_section_);
+
+ if (!is_padded) {
+ LOG(INFO) << "Expansion : " << unpacked_bytes - packed_bytes << " bytes";
+ }
+
+ // Rewrite the current dynamic relocations section with unpacked version of
+ // relocations.
+ const void* section_data = nullptr;
+ std::vector<typename ELF::Rel> unpacked_rel_relocations;
+ if (relocations_type_ == RELA) {
+ section_data = &unpacked_relocations[0];
+ } else if (relocations_type_ == REL) {
+ ConvertRelaVectorToRelVector(unpacked_relocations, &unpacked_rel_relocations);
+ section_data = &unpacked_rel_relocations[0];
+ } else {
+ NOTREACHED();
+ }
+
+ ResizeSection(elf_, relocations_section_, unpacked_bytes,
+ relocations_type_ == REL ? SHT_REL : SHT_RELA, relocations_type_);
+ RewriteSectionData(relocations_section_, section_data, unpacked_bytes);
+
+ // Rewrite .dynamic to remove two tags describing packed android relocations.
+ data = GetSectionData(dynamic_section_);
+ const typename ELF::Dyn* dynamic_base = reinterpret_cast<typename ELF::Dyn*>(data->d_buf);
+ std::vector<typename ELF::Dyn> dynamics(
+ dynamic_base,
+ dynamic_base + data->d_size / sizeof(dynamics[0]));
+ {
+ typename ELF::Dyn dyn;
+ dyn.d_tag = relocations_type_ == REL ? DT_REL : DT_RELA;
+ dyn.d_un.d_ptr = section_header->sh_addr;
+ ReplaceDynamicEntry<ELF>(relocations_type_ == REL ? DT_ANDROID_REL : DT_ANDROID_RELA,
+ dyn, &dynamics);
+ }
+
+ {
+ typename ELF::Dyn dyn;
+ dyn.d_tag = relocations_type_ == REL ? DT_RELSZ : DT_RELASZ;
+ dyn.d_un.d_val = section_header->sh_size;
+ ReplaceDynamicEntry<ELF>(relocations_type_ == REL ? DT_ANDROID_RELSZ : DT_ANDROID_RELASZ,
+ dyn, &dynamics);
+ }
+
+ const void* dynamics_data = &dynamics[0];
+ const size_t dynamics_bytes = dynamics.size() * sizeof(dynamics[0]);
+ RewriteSectionData(dynamic_section_, dynamics_data, dynamics_bytes);
+
+ Flush();
+ return true;
+}
+
+// Flush rewritten shared object file data.
+template <typename ELF>
+void ElfFile<ELF>::Flush() {
+ // Flag all ELF data held in memory as needing to be written back to the
+ // file, and tell libelf that we have controlled the file layout.
+ elf_flagelf(elf_, ELF_C_SET, ELF_F_DIRTY);
+ elf_flagelf(elf_, ELF_C_SET, ELF_F_LAYOUT);
+
+ // Write ELF data back to disk.
+ const off_t file_bytes = elf_update(elf_, ELF_C_WRITE);
+ if (file_bytes == -1) {
+ LOG(ERROR) << "elf_update failed: " << elf_errmsg(elf_errno());
+ }
+
+ CHECK(file_bytes > 0);
+ VLOG(1) << "elf_update returned: " << file_bytes;
+
+ // Clean up libelf, and truncate the output file to the number of bytes
+ // written by elf_update().
+ elf_end(elf_);
+ elf_ = NULL;
+ const int truncate = ftruncate(fd_, file_bytes);
+ CHECK(truncate == 0);
+}
+
+template <typename ELF>
+void ElfFile<ELF>::ConvertRelArrayToRelaVector(const typename ELF::Rel* rel_array,
+ size_t rel_array_size,
+ std::vector<typename ELF::Rela>* rela_vector) {
+ for (size_t i = 0; i<rel_array_size; ++i) {
+ typename ELF::Rela rela;
+ rela.r_offset = rel_array[i].r_offset;
+ rela.r_info = rel_array[i].r_info;
+ rela.r_addend = 0;
+ rela_vector->push_back(rela);
+ }
+}
+
+template <typename ELF>
+void ElfFile<ELF>::ConvertRelaVectorToRelVector(const std::vector<typename ELF::Rela>& rela_vector,
+ std::vector<typename ELF::Rel>* rel_vector) {
+ for (auto rela : rela_vector) {
+ typename ELF::Rel rel;
+ rel.r_offset = rela.r_offset;
+ rel.r_info = rela.r_info;
+ CHECK(rela.r_addend == 0);
+ rel_vector->push_back(rel);
+ }
+}
+
+template class ElfFile<ELF32_traits>;
+template class ElfFile<ELF64_traits>;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/elf_file.h b/tools/relocation_packer/src/elf_file.h
new file mode 100644
index 0000000..73c3192
--- /dev/null
+++ b/tools/relocation_packer/src/elf_file.h
@@ -0,0 +1,155 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// ELF shared object file updates handler.
+//
+// Provides functions to remove relative relocations from the .rel.dyn
+// or .rela.dyn sections and pack into .android.rel.dyn or .android.rela.dyn,
+// and unpack to return the file to its pre-packed state.
+//
+// Files to be packed or unpacked must include an existing .android.rel.dyn
+// or android.rela.dyn section. A standard libchrome.<version>.so will not
+// contain this section, so the following can be used to add one:
+//
+// echo -n 'NULL' >/tmp/small
+// if file libchrome.<version>.so | grep -q 'ELF 32'; then
+// arm-linux-androideabi-objcopy
+// --add-section .android.rel.dyn=/tmp/small
+// libchrome.<version>.so libchrome.<version>.so.packed
+// else
+// aarch64-linux-android-objcopy
+// --add-section .android.rela.dyn=/tmp/small
+// libchrome.<version>.so libchrome.<version>.so.packed
+// fi
+// rm /tmp/small
+//
+// To use, open the file and pass the file descriptor to the constructor,
+// then pack or unpack as desired. Packing or unpacking will flush the file
+// descriptor on success. Example:
+//
+// int fd = open(..., O_RDWR);
+// ElfFile elf_file(fd);
+// bool status;
+// if (is_packing)
+// status = elf_file.PackRelocations();
+// else
+// status = elf_file.UnpackRelocations();
+// close(fd);
+//
+// SetPadding() causes PackRelocations() to pad .rel.dyn or .rela.dyn with
+// NONE-type entries rather than cutting a hole out of the shared object
+// file. This keeps all load addresses and offsets constant, and enables
+// easier debugging and testing.
+//
+// A packed shared object file has all of its relative relocations
+// removed from .rel.dyn or .rela.dyn, and replaced as packed data in
+// .android.rel.dyn or .android.rela.dyn respectively. The resulting file
+// is shorter than its non-packed original.
+//
+// Unpacking a packed file restores the file to its non-packed state, by
+// expanding the packed data in .android.rel.dyn or .android.rela.dyn,
+// combining the relative relocations with the data already in .rel.dyn
+// or .rela.dyn, and then writing back the now expanded section.
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_ELF_FILE_H_
+#define TOOLS_RELOCATION_PACKER_SRC_ELF_FILE_H_
+
+#include <string.h>
+#include <vector>
+
+#include "elf.h"
+#include "libelf.h"
+#include "packer.h"
+
+namespace relocation_packer {
+
+// An ElfFile reads shared objects, and shuttles relative relocations
+// between .rel.dyn or .rela.dyn and .android.rel.dyn or .android.rela.dyn
+// sections.
+template <typename ELF>
+class ElfFile {
+ public:
+ explicit ElfFile(int fd)
+ : fd_(fd), is_padding_relocations_(false), elf_(NULL),
+ relocations_section_(NULL), dynamic_section_(NULL),
+ relocations_type_(NONE) {}
+ ~ElfFile() {}
+
+ // Set padding mode. When padding, PackRelocations() will not shrink
+ // the .rel.dyn or .rela.dyn section, but instead replace relative with
+ // NONE-type entries.
+ // |flag| is true to pad .rel.dyn or .rela.dyn, false to shrink it.
+ inline void SetPadding(bool flag) { is_padding_relocations_ = flag; }
+
+ // Transfer relative relocations from .rel.dyn or .rela.dyn to a packed
+ // representation in .android.rel.dyn or .android.rela.dyn. Returns true
+ // on success.
+ bool PackRelocations();
+
+ // Transfer relative relocations from a packed representation in
+ // .android.rel.dyn or .android.rela.dyn to .rel.dyn or .rela.dyn. Returns
+ // true on success.
+ bool UnpackRelocations();
+
+ private:
+ enum relocations_type_t {
+ NONE = 0, REL, RELA
+ };
+
+ // Load a new ElfFile from a filedescriptor. If flushing, the file must
+ // be open for read/write. Returns true on successful ELF file load.
+ // |fd| is an open file descriptor for the shared object.
+ bool Load();
+
+ // Templated packer, helper for PackRelocations(). Rel type is one of
+ // ELF::Rel or ELF::Rela.
+ bool PackTypedRelocations(std::vector<typename ELF::Rela>* relocations);
+
+ // Templated unpacker, helper for UnpackRelocations(). Rel type is one of
+ // ELF::Rel or ELF::Rela.
+ bool UnpackTypedRelocations(const std::vector<uint8_t>& packed);
+
+ // Write ELF file changes.
+ void Flush();
+
+ void AdjustRelativeRelocationTargets(typename ELF::Off hole_start,
+ ssize_t hole_size,
+ std::vector<typename ELF::Rela>* relocations);
+
+ static void ResizeSection(Elf* elf, Elf_Scn* section, size_t new_size,
+ typename ELF::Word new_sh_type, relocations_type_t relocations_type);
+
+ static void AdjustDynamicSectionForHole(Elf_Scn* dynamic_section,
+ typename ELF::Off hole_start,
+ ssize_t hole_size,
+ relocations_type_t relocations_type);
+
+ static void ConvertRelArrayToRelaVector(const typename ELF::Rel* rel_array, size_t rel_array_size,
+ std::vector<typename ELF::Rela>* rela_vector);
+
+ static void ConvertRelaVectorToRelVector(const std::vector<typename ELF::Rela>& rela_vector,
+ std::vector<typename ELF::Rel>* rel_vector);
+
+
+ // File descriptor opened on the shared object.
+ int fd_;
+
+ // If set, pad rather than shrink .rel.dyn or .rela.dyn. Primarily for
+ // debugging, allows packing to be checked without affecting load addresses.
+ bool is_padding_relocations_;
+
+ // Libelf handle, assigned by Load().
+ Elf* elf_;
+
+ // Sections that we manipulate, assigned by Load().
+ Elf_Scn* relocations_section_;
+ Elf_Scn* dynamic_section_;
+
+ // Relocation type found, assigned by Load().
+ relocations_type_t relocations_type_;
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_ELF_FILE_H_
diff --git a/tools/relocation_packer/src/elf_file_unittest.cc b/tools/relocation_packer/src/elf_file_unittest.cc
new file mode 100644
index 0000000..434f101
--- /dev/null
+++ b/tools/relocation_packer/src/elf_file_unittest.cc
@@ -0,0 +1,188 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "elf_file.h"
+
+#include <limits.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string>
+#include <vector>
+#include "debug.h"
+#include "elf_traits.h"
+#include "gtest/gtest.h"
+
+namespace {
+
+void GetDataFilePath(const char* name, std::string* path) {
+ std::string data_dir;
+
+ const char* bindir = getenv("bindir");
+ if (bindir) {
+ data_dir = std::string(bindir);
+ } else {
+ char path[PATH_MAX];
+ memset(path, 0, sizeof(path));
+ ASSERT_NE(-1, readlink("/proc/self/exe", path, sizeof(path) - 1));
+
+ data_dir = std::string(path);
+ size_t pos = data_dir.rfind('/');
+ ASSERT_NE(std::string::npos, pos);
+
+ data_dir.erase(pos);
+ }
+
+ *path = data_dir + "/" + name;
+}
+
+void OpenRelocsTestFile(const char* name, FILE** stream) {
+ std::string path;
+ GetDataFilePath(name, &path);
+
+ FILE* testfile = fopen(path.c_str(), "rb");
+ ASSERT_FALSE(testfile == NULL) << "Error opening '" << path << "'";
+
+ FILE* temporary = tmpfile();
+ ASSERT_FALSE(temporary == NULL);
+
+ static const size_t buffer_size = 4096;
+ unsigned char buffer[buffer_size];
+
+ size_t bytes;
+ do {
+ bytes = fread(buffer, 1, sizeof(buffer), testfile);
+ ASSERT_EQ(bytes, fwrite(buffer, 1, bytes, temporary));
+ } while (bytes > 0);
+
+ ASSERT_EQ(0, fclose(testfile));
+ ASSERT_EQ(0, fseek(temporary, 0, SEEK_SET));
+ ASSERT_EQ(0, lseek(fileno(temporary), 0, SEEK_SET));
+
+ *stream = temporary;
+}
+
+void OpenRelocsTestFiles(const std::string& arch, FILE** relocs_so, FILE** packed_relocs_so) {
+ const std::string base = std::string("elf_file_unittest_relocs_") + arch;
+ const std::string relocs = base + ".so";
+ const std::string packed_relocs = base + "_packed.so";
+
+ OpenRelocsTestFile(relocs.c_str(), relocs_so);
+ OpenRelocsTestFile(packed_relocs.c_str(), packed_relocs_so);
+}
+
+void CloseRelocsTestFile(FILE* temporary) {
+ fclose(temporary);
+}
+
+void CloseRelocsTestFiles(FILE* relocs_so, FILE* packed_relocs_so) {
+ CloseRelocsTestFile(relocs_so);
+ CloseRelocsTestFile(packed_relocs_so);
+}
+
+void CheckFileContentsEqual(FILE* first, FILE* second) {
+ ASSERT_EQ(0, fseek(first, 0, SEEK_SET));
+ ASSERT_EQ(0, fseek(second, 0, SEEK_SET));
+
+ static const size_t buffer_size = 4096;
+ unsigned char first_buffer[buffer_size];
+ unsigned char second_buffer[buffer_size];
+
+ do {
+ size_t first_read = fread(first_buffer, 1, sizeof(first_buffer), first);
+ size_t second_read = fread(second_buffer, 1, sizeof(second_buffer), second);
+
+ EXPECT_EQ(first_read, second_read);
+ EXPECT_EQ(0, memcmp(first_buffer, second_buffer, first_read));
+ } while (!feof(first) && !feof(second));
+
+ EXPECT_TRUE(feof(first) && feof(second));
+}
+
+template <typename ELF>
+static void ProcessUnpack(FILE* relocs_so, FILE* packed_relocs_so) {
+ relocation_packer::ElfFile<ELF> elf_file(fileno(packed_relocs_so));
+
+ // Ensure packing fails (already packed).
+ EXPECT_FALSE(elf_file.PackRelocations());
+
+ // Unpack golden relocations, and check files are now identical.
+ EXPECT_TRUE(elf_file.UnpackRelocations());
+ CheckFileContentsEqual(packed_relocs_so, relocs_so);
+
+ CloseRelocsTestFiles(relocs_so, packed_relocs_so);
+}
+
+static void RunUnpackRelocationsTestFor(const std::string& arch) {
+ ASSERT_NE(static_cast<uint32_t>(EV_NONE), elf_version(EV_CURRENT));
+
+ FILE* relocs_so = NULL;
+ FILE* packed_relocs_so = NULL;
+ OpenRelocsTestFiles(arch, &relocs_so, &packed_relocs_so);
+
+ if (relocs_so != NULL && packed_relocs_so != NULL) {
+ // lets detect elf class
+ ASSERT_EQ(0, fseek(relocs_so, EI_CLASS, SEEK_SET))
+ << "Invalid file length: " << strerror(errno);
+ uint8_t elf_class = 0;
+ ASSERT_EQ(1U, fread(&elf_class, 1, 1, relocs_so));
+ ASSERT_EQ(0, fseek(relocs_so, 0, SEEK_SET));
+ if (elf_class == ELFCLASS32) {
+ ProcessUnpack<ELF32_traits>(relocs_so, packed_relocs_so);
+ } else {
+ ProcessUnpack<ELF64_traits>(relocs_so, packed_relocs_so);
+ }
+ }
+}
+
+template <typename ELF>
+static void ProcessPack(FILE* relocs_so, FILE* packed_relocs_so) {
+ relocation_packer::ElfFile<ELF> elf_file(fileno(relocs_so));
+
+ // Ensure unpacking fails (not packed).
+ EXPECT_FALSE(elf_file.UnpackRelocations());
+
+ // Pack relocations, and check files are now identical.
+ EXPECT_TRUE(elf_file.PackRelocations());
+ CheckFileContentsEqual(relocs_so, packed_relocs_so);
+
+ CloseRelocsTestFiles(relocs_so, packed_relocs_so);
+}
+
+static void RunPackRelocationsTestFor(const std::string& arch) {
+ ASSERT_NE(static_cast<uint32_t>(EV_NONE), elf_version(EV_CURRENT));
+
+ FILE* relocs_so = NULL;
+ FILE* packed_relocs_so = NULL;
+ OpenRelocsTestFiles(arch, &relocs_so, &packed_relocs_so);
+
+ if (relocs_so != NULL && packed_relocs_so != NULL) {
+ // lets detect elf class
+ ASSERT_EQ(0, fseek(packed_relocs_so, EI_CLASS, SEEK_SET))
+ << "Invalid file length: " << strerror(errno);
+ uint8_t elf_class = 0;
+ ASSERT_EQ(1U, fread(&elf_class, 1, 1, packed_relocs_so));
+ fseek(packed_relocs_so, 0, SEEK_SET);
+ if (elf_class == ELFCLASS32) {
+ ProcessPack<ELF32_traits>(relocs_so, packed_relocs_so);
+ } else {
+ ProcessPack<ELF64_traits>(relocs_so, packed_relocs_so);
+ }
+ }
+}
+
+} // namespace
+
+namespace relocation_packer {
+
+TEST(ElfFile, PackRelocations) {
+ RunPackRelocationsTestFor("arm32");
+ RunPackRelocationsTestFor("arm64");
+}
+
+TEST(ElfFile, UnpackRelocations) {
+ RunUnpackRelocationsTestFor("arm32");
+ RunUnpackRelocationsTestFor("arm64");
+}
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/elf_traits.h b/tools/relocation_packer/src/elf_traits.h
new file mode 100644
index 0000000..41b06c8
--- /dev/null
+++ b/tools/relocation_packer/src/elf_traits.h
@@ -0,0 +1,64 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Target-specific ELF type traits.
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_ELF_TRAITS_H_
+#define TOOLS_RELOCATION_PACKER_SRC_ELF_TRAITS_H_
+
+#include "elf.h"
+#include "libelf.h"
+
+// ELF is a traits structure used to provide convenient aliases for
+// 32/64 bit Elf types and functions, depending on the target file.
+
+struct ELF32_traits {
+ typedef Elf32_Addr Addr;
+ typedef Elf32_Dyn Dyn;
+ typedef Elf32_Ehdr Ehdr;
+ typedef Elf32_Off Off;
+ typedef Elf32_Phdr Phdr;
+ typedef Elf32_Rel Rel;
+ typedef Elf32_Rela Rela;
+ typedef Elf32_Shdr Shdr;
+ typedef Elf32_Sword Sword;
+ typedef Elf32_Sxword Sxword;
+ typedef Elf32_Sym Sym;
+ typedef Elf32_Word Word;
+ typedef Elf32_Xword Xword;
+ typedef Elf32_Half Half;
+
+ static inline Ehdr* getehdr(Elf* elf) { return elf32_getehdr(elf); }
+ static inline Phdr* getphdr(Elf* elf) { return elf32_getphdr(elf); }
+ static inline Shdr* getshdr(Elf_Scn* scn) { return elf32_getshdr(scn); }
+ static inline Word elf_r_type(Word info) { return ELF32_R_TYPE(info); }
+ static inline int elf_st_type(uint8_t info) { return ELF32_ST_TYPE(info); }
+ static inline Word elf_r_sym(Word info) { return ELF32_R_SYM(info); }
+};
+
+struct ELF64_traits {
+ typedef Elf64_Addr Addr;
+ typedef Elf64_Dyn Dyn;
+ typedef Elf64_Ehdr Ehdr;
+ typedef Elf64_Off Off;
+ typedef Elf64_Phdr Phdr;
+ typedef Elf64_Rel Rel;
+ typedef Elf64_Rela Rela;
+ typedef Elf64_Shdr Shdr;
+ typedef Elf64_Sword Sword;
+ typedef Elf64_Sxword Sxword;
+ typedef Elf64_Sym Sym;
+ typedef Elf64_Word Word;
+ typedef Elf64_Xword Xword;
+ typedef Elf64_Half Half;
+
+ static inline Ehdr* getehdr(Elf* elf) { return elf64_getehdr(elf); }
+ static inline Phdr* getphdr(Elf* elf) { return elf64_getphdr(elf); }
+ static inline Shdr* getshdr(Elf_Scn* scn) { return elf64_getshdr(scn); }
+ static inline Xword elf_r_type(Xword info) { return ELF64_R_TYPE(info); }
+ static inline int elf_st_type(uint8_t info) { return ELF64_ST_TYPE(info); }
+ static inline Word elf_r_sym(Xword info) { return ELF64_R_SYM(info); }
+};
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_ELF_TRAITS_H_
diff --git a/tools/relocation_packer/src/leb128.cc b/tools/relocation_packer/src/leb128.cc
new file mode 100644
index 0000000..101c557
--- /dev/null
+++ b/tools/relocation_packer/src/leb128.cc
@@ -0,0 +1,87 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "leb128.h"
+
+#include <stdint.h>
+#include <vector>
+
+#include "elf_traits.h"
+
+namespace relocation_packer {
+
+// Empty constructor and destructor to silence chromium-style.
+template <typename uint_t>
+Leb128Encoder<uint_t>::Leb128Encoder() { }
+
+template <typename uint_t>
+Leb128Encoder<uint_t>::~Leb128Encoder() { }
+
+// Add a single value to the encoding. Values are encoded with variable
+// length. The least significant 7 bits of each byte hold 7 bits of data,
+// and the most significant bit is set on each byte except the last.
+template <typename uint_t>
+void Leb128Encoder<uint_t>::Enqueue(uint_t value) {
+ uint_t uvalue = static_cast<uint_t>(value);
+ do {
+ const uint8_t byte = uvalue & 127;
+ uvalue >>= 7;
+ encoding_.push_back((uvalue ? 128 : 0) | byte);
+ } while (uvalue);
+}
+
+// Add a vector of values to the encoding.
+template <typename uint_t>
+void Leb128Encoder<uint_t>::EnqueueAll(const std::vector<uint_t>& values) {
+ for (size_t i = 0; i < values.size(); ++i) {
+ Enqueue(values[i]);
+ }
+}
+
+// Create a new decoder for the given encoded stream.
+template <typename uint_t>
+Leb128Decoder<uint_t>::Leb128Decoder(const std::vector<uint8_t>& encoding, size_t start_with) {
+ encoding_ = encoding;
+ cursor_ = start_with;
+}
+
+// Empty destructor to silence chromium-style.
+template <typename uint_t>
+Leb128Decoder<uint_t>::~Leb128Decoder() { }
+
+// Decode and retrieve a single value from the encoding. Read forwards until
+// a byte without its most significant bit is found, then read the 7 bit
+// fields of the bytes spanned to re-form the value.
+template <typename uint_t>
+uint_t Leb128Decoder<uint_t>::Dequeue() {
+ uint_t value = 0;
+
+ size_t shift = 0;
+ uint8_t byte;
+
+ // Loop until we reach a byte with its high order bit clear.
+ do {
+ byte = encoding_[cursor_++];
+ value |= static_cast<uint_t>(byte & 127) << shift;
+ shift += 7;
+ } while (byte & 128);
+
+ return value;
+}
+
+// Decode and retrieve all remaining values from the encoding.
+template <typename uint_t>
+void Leb128Decoder<uint_t>::DequeueAll(std::vector<uint_t>* values) {
+ while (cursor_ < encoding_.size()) {
+ values->push_back(Dequeue());
+ }
+}
+
+template class Leb128Encoder<uint32_t>;
+template class Leb128Encoder<uint64_t>;
+
+template class Leb128Decoder<uint32_t>;
+template class Leb128Decoder<uint64_t>;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/leb128.h b/tools/relocation_packer/src/leb128.h
new file mode 100644
index 0000000..2c5b5d0
--- /dev/null
+++ b/tools/relocation_packer/src/leb128.h
@@ -0,0 +1,76 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// LEB128 encoder and decoder for packed relative relocations.
+//
+// Run-length encoded relative relocations consist of a large number
+// of pairs of relatively small positive integer values. Encoding these as
+// LEB128 saves space.
+//
+// For more on LEB128 see http://en.wikipedia.org/wiki/LEB128.
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_LEB128_H_
+#define TOOLS_RELOCATION_PACKER_SRC_LEB128_H_
+
+#include <stdint.h>
+#include <vector>
+
+#include "elf_traits.h"
+
+namespace relocation_packer {
+
+// Encode packed words as a LEB128 byte stream.
+template <typename uint_t>
+class Leb128Encoder {
+ public:
+ // Explicit (but empty) constructor and destructor, for chromium-style.
+ Leb128Encoder();
+ ~Leb128Encoder();
+
+ // Add a value to the encoding stream.
+ // |value| is the unsigned int to add.
+ void Enqueue(uint_t value);
+
+ // Add a vector of values to the encoding stream.
+ // |values| is the vector of unsigned ints to add.
+ void EnqueueAll(const std::vector<uint_t>& values);
+
+ // Retrieve the encoded representation of the values.
+ // |encoding| is the returned vector of encoded data.
+ void GetEncoding(std::vector<uint8_t>* encoding) { *encoding = encoding_; }
+
+ private:
+ // Growable vector holding the encoded LEB128 stream.
+ std::vector<uint8_t> encoding_;
+};
+
+// Decode a LEB128 byte stream to produce packed words.
+template <typename uint_t>
+class Leb128Decoder {
+ public:
+ // Create a new decoder for the given encoded stream.
+ // |encoding| is the vector of encoded data.
+ explicit Leb128Decoder(const std::vector<uint8_t>& encoding, size_t start_with);
+
+ // Explicit (but empty) destructor, for chromium-style.
+ ~Leb128Decoder();
+
+ // Retrieve the next value from the encoded stream.
+ uint_t Dequeue();
+
+ // Retrieve all remaining values from the encoded stream.
+ // |values| is the vector of decoded data.
+ void DequeueAll(std::vector<uint_t>* values);
+
+ private:
+ // Encoded LEB128 stream.
+ std::vector<uint8_t> encoding_;
+
+ // Cursor indicating the current stream retrieval point.
+ size_t cursor_;
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_LEB128_H_
diff --git a/tools/relocation_packer/src/leb128_unittest.cc b/tools/relocation_packer/src/leb128_unittest.cc
new file mode 100644
index 0000000..8a7028c
--- /dev/null
+++ b/tools/relocation_packer/src/leb128_unittest.cc
@@ -0,0 +1,111 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "leb128.h"
+
+#include <vector>
+#include "gtest/gtest.h"
+
+namespace relocation_packer {
+
+TEST(Leb128, Encoder64) {
+ std::vector<uint64_t> values;
+ values.push_back(624485);
+ values.push_back(0);
+ values.push_back(1);
+ values.push_back(127);
+ values.push_back(128);
+
+ Leb128Encoder<uint64_t> encoder;
+ encoder.EnqueueAll(values);
+
+ encoder.Enqueue(4294967295);
+ encoder.Enqueue(18446744073709551615ul);
+
+ std::vector<uint8_t> encoding;
+ encoder.GetEncoding(&encoding);
+
+ EXPECT_EQ(23U, encoding.size());
+ // 624485
+ EXPECT_EQ(0xe5, encoding[0]);
+ EXPECT_EQ(0x8e, encoding[1]);
+ EXPECT_EQ(0x26, encoding[2]);
+ // 0
+ EXPECT_EQ(0x00, encoding[3]);
+ // 1
+ EXPECT_EQ(0x01, encoding[4]);
+ // 127
+ EXPECT_EQ(0x7f, encoding[5]);
+ // 128
+ EXPECT_EQ(0x80, encoding[6]);
+ EXPECT_EQ(0x01, encoding[7]);
+ // 4294967295
+ EXPECT_EQ(0xff, encoding[8]);
+ EXPECT_EQ(0xff, encoding[9]);
+ EXPECT_EQ(0xff, encoding[10]);
+ EXPECT_EQ(0xff, encoding[11]);
+ EXPECT_EQ(0x0f, encoding[12]);
+ // 18446744073709551615
+ EXPECT_EQ(0xff, encoding[13]);
+ EXPECT_EQ(0xff, encoding[14]);
+ EXPECT_EQ(0xff, encoding[15]);
+ EXPECT_EQ(0xff, encoding[16]);
+ EXPECT_EQ(0xff, encoding[17]);
+ EXPECT_EQ(0xff, encoding[18]);
+ EXPECT_EQ(0xff, encoding[19]);
+ EXPECT_EQ(0xff, encoding[20]);
+ EXPECT_EQ(0xff, encoding[21]);
+ EXPECT_EQ(0x01, encoding[22]);
+}
+
+TEST(Leb128, Decoder64) {
+ std::vector<uint8_t> encoding;
+ // 624485
+ encoding.push_back(0xe5);
+ encoding.push_back(0x8e);
+ encoding.push_back(0x26);
+ // 0
+ encoding.push_back(0x00);
+ // 1
+ encoding.push_back(0x01);
+ // 127
+ encoding.push_back(0x7f);
+ // 128
+ encoding.push_back(0x80);
+ encoding.push_back(0x01);
+ // 4294967295
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0x0f);
+ // 18446744073709551615
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0x01);
+
+ Leb128Decoder<uint64_t> decoder(encoding, 0);
+
+ EXPECT_EQ(624485U, decoder.Dequeue());
+
+ std::vector<uint64_t> dequeued;
+ decoder.DequeueAll(&dequeued);
+
+ EXPECT_EQ(6U, dequeued.size());
+ EXPECT_EQ(0U, dequeued[0]);
+ EXPECT_EQ(1U, dequeued[1]);
+ EXPECT_EQ(127U, dequeued[2]);
+ EXPECT_EQ(128U, dequeued[3]);
+ EXPECT_EQ(4294967295U, dequeued[4]);
+ EXPECT_EQ(18446744073709551615UL, dequeued[5]);
+}
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/main.cc b/tools/relocation_packer/src/main.cc
new file mode 100644
index 0000000..3f784e4
--- /dev/null
+++ b/tools/relocation_packer/src/main.cc
@@ -0,0 +1,153 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Tool to pack and unpack relative relocations in a shared library.
+//
+// Packing removes relative relocations from .rel.dyn and writes them
+// in a more compact form to .android.rel.dyn. Unpacking does the reverse.
+//
+// Invoke with -v to trace actions taken when packing or unpacking.
+// Invoke with -p to pad removed relocations with R_*_NONE. Suppresses
+// shrinking of .rel.dyn.
+// See PrintUsage() below for full usage details.
+//
+// NOTE: Breaks with libelf 0.152, which is buggy. libelf 0.158 works.
+
+#include <errno.h>
+#include <fcntl.h>
+#include <getopt.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <string>
+
+#include "debug.h"
+#include "elf_file.h"
+#include "elf_traits.h"
+#include "libelf.h"
+
+#include "nativehelper/ScopedFd.h"
+
+static void PrintUsage(const char* argv0) {
+ std::string temporary = argv0;
+ const size_t last_slash = temporary.find_last_of("/");
+ if (last_slash != temporary.npos) {
+ temporary.erase(0, last_slash + 1);
+ }
+ const char* basename = temporary.c_str();
+
+ printf(
+ "Usage: %s [-u] [-v] [-p] file\n\n"
+ "Pack or unpack relative relocations in a shared library.\n\n"
+ " -u, --unpack unpack previously packed relative relocations\n"
+ " -v, --verbose trace object file modifications (for debugging)\n"
+ " -p, --pad do not shrink relocations, but pad (for debugging)\n\n",
+ basename);
+
+ printf(
+ "Debug sections are not handled, so packing should not be used on\n"
+ "shared libraries compiled for debugging or otherwise unstripped.\n");
+}
+
+int main(int argc, char* argv[]) {
+ bool is_unpacking = false;
+ bool is_verbose = false;
+ bool is_padding = false;
+
+ static const option options[] = {
+ {"unpack", 0, 0, 'u'}, {"verbose", 0, 0, 'v'}, {"pad", 0, 0, 'p'},
+ {"help", 0, 0, 'h'}, {NULL, 0, 0, 0}
+ };
+ bool has_options = true;
+ while (has_options) {
+ int c = getopt_long(argc, argv, "uvph", options, NULL);
+ switch (c) {
+ case 'u':
+ is_unpacking = true;
+ break;
+ case 'v':
+ is_verbose = true;
+ break;
+ case 'p':
+ is_padding = true;
+ break;
+ case 'h':
+ PrintUsage(argv[0]);
+ return 0;
+ case '?':
+ LOG(INFO) << "Try '" << argv[0] << " --help' for more information.";
+ return 1;
+ case -1:
+ has_options = false;
+ break;
+ default:
+ NOTREACHED();
+ return 1;
+ }
+ }
+ if (optind != argc - 1) {
+ LOG(INFO) << "Try '" << argv[0] << " --help' for more information.";
+ return 1;
+ }
+
+ if (elf_version(EV_CURRENT) == EV_NONE) {
+ LOG(WARNING) << "Elf Library is out of date!";
+ }
+
+ const char* file = argv[argc - 1];
+ ScopedFd fd(open(file, O_RDWR));
+ if (fd.get() == -1) {
+ LOG(ERROR) << file << ": " << strerror(errno);
+ return 1;
+ }
+
+ if (is_verbose)
+ relocation_packer::Logger::SetVerbose(1);
+
+ // We need to detect elf class in order to create
+ // correct implementation
+ uint8_t e_ident[EI_NIDENT];
+ if (TEMP_FAILURE_RETRY(read(fd.get(), e_ident, EI_NIDENT) != EI_NIDENT)) {
+ LOG(ERROR) << file << ": failed to read elf header:" << strerror(errno);
+ return 1;
+ }
+
+ if (TEMP_FAILURE_RETRY(lseek(fd.get(), 0, SEEK_SET)) != 0) {
+ LOG(ERROR) << file << ": lseek to 0 failed:" << strerror(errno);
+ return 1;
+ }
+
+ bool status = false;
+
+ if (e_ident[EI_CLASS] == ELFCLASS32) {
+ relocation_packer::ElfFile<ELF32_traits> elf_file(fd.get());
+ elf_file.SetPadding(is_padding);
+
+ if (is_unpacking) {
+ status = elf_file.UnpackRelocations();
+ } else {
+ status = elf_file.PackRelocations();
+ }
+ } else if (e_ident[EI_CLASS] == ELFCLASS64) {
+ relocation_packer::ElfFile<ELF64_traits> elf_file(fd.get());
+ elf_file.SetPadding(is_padding);
+
+ if (is_unpacking) {
+ status = elf_file.UnpackRelocations();
+ } else {
+ status = elf_file.PackRelocations();
+ }
+ } else {
+ LOG(ERROR) << file << ": unknown ELFCLASS: " << e_ident[EI_CLASS];
+ return 1;
+ }
+
+ if (!status) {
+ LOG(ERROR) << file << ": failed to pack/unpack file";
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/tools/relocation_packer/src/packer.cc b/tools/relocation_packer/src/packer.cc
new file mode 100644
index 0000000..8e30612
--- /dev/null
+++ b/tools/relocation_packer/src/packer.cc
@@ -0,0 +1,88 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "packer.h"
+
+#include <vector>
+
+#include "debug.h"
+#include "delta_encoder.h"
+#include "elf_traits.h"
+#include "leb128.h"
+#include "sleb128.h"
+
+namespace relocation_packer {
+
+// Pack relocations into a group encoded packed representation.
+template <typename ELF>
+void RelocationPacker<ELF>::PackRelocations(const std::vector<typename ELF::Rela>& relocations,
+ std::vector<uint8_t>* packed) {
+ // Run-length encode.
+ std::vector<typename ELF::Addr> packed_words;
+ RelocationDeltaCodec<ELF> codec;
+ codec.Encode(relocations, &packed_words);
+
+ // If insufficient data do nothing.
+ if (packed_words.empty())
+ return;
+
+ Sleb128Encoder<typename ELF::Addr> sleb128_encoder;
+ Leb128Encoder<typename ELF::Addr> leb128_encoder;
+
+ std::vector<uint8_t> leb128_packed;
+ std::vector<uint8_t> sleb128_packed;
+
+ leb128_encoder.EnqueueAll(packed_words);
+ leb128_encoder.GetEncoding(&leb128_packed);
+
+ sleb128_encoder.EnqueueAll(packed_words);
+ sleb128_encoder.GetEncoding(&sleb128_packed);
+
+ // TODO (simonb): Estimate savings on current android system image and consider using
+ // one encoder for all packed relocations to reduce complexity.
+ if (leb128_packed.size() <= sleb128_packed.size()) {
+ packed->push_back('A');
+ packed->push_back('P');
+ packed->push_back('U');
+ packed->push_back('2');
+ packed->insert(packed->end(), leb128_packed.begin(), leb128_packed.end());
+ } else {
+ packed->push_back('A');
+ packed->push_back('P');
+ packed->push_back('S');
+ packed->push_back('2');
+ packed->insert(packed->end(), sleb128_packed.begin(), sleb128_packed.end());
+ }
+}
+
+// Unpack relative relocations from a run-length encoded packed
+// representation.
+template <typename ELF>
+void RelocationPacker<ELF>::UnpackRelocations(
+ const std::vector<uint8_t>& packed,
+ std::vector<typename ELF::Rela>* relocations) {
+
+ std::vector<typename ELF::Addr> packed_words;
+ CHECK(packed.size() > 4 &&
+ packed[0] == 'A' &&
+ packed[1] == 'P' &&
+ (packed[2] == 'U' || packed[2] == 'S') &&
+ packed[3] == '2');
+
+ if (packed[2] == 'U') {
+ Leb128Decoder<typename ELF::Addr> decoder(packed, 4);
+ decoder.DequeueAll(&packed_words);
+ } else {
+ Sleb128Decoder<typename ELF::Addr> decoder(packed, 4);
+ decoder.DequeueAll(&packed_words);
+ }
+
+ RelocationDeltaCodec<ELF> codec;
+ codec.Decode(packed_words, relocations);
+}
+
+template class RelocationPacker<ELF32_traits>;
+template class RelocationPacker<ELF64_traits>;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/packer.h b/tools/relocation_packer/src/packer.h
new file mode 100644
index 0000000..8a57e62
--- /dev/null
+++ b/tools/relocation_packer/src/packer.h
@@ -0,0 +1,74 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Pack relative relocations into a more compact form.
+//
+//
+// For relative relocations without addends (32 bit platforms)
+// -----------------------------------------------------------
+//
+// Applies two packing strategies. The first is run-length encoding, which
+// turns a large set of relative relocations into a much smaller set
+// of delta-count pairs, prefixed with a two-word header comprising the
+// count of pairs and the initial relocation offset. The second is LEB128
+// encoding, which compresses the result of run-length encoding.
+//
+// Once packed, data is prefixed by an identifier that allows for any later
+// versioning of packing strategies.
+//
+// A complete packed stream of relocations without addends might look
+// something like:
+//
+// "APR1" pairs init_offset count1 delta1 count2 delta2 ...
+// 41505231 f2b003 b08ac716 e001 04 01 10 ...
+//
+//
+// For relative relocations with addends (64 bit platforms)
+// --------------------------------------------------------
+//
+// Applies two packing strategies. The first is delta encoding, which
+// turns a large set of relative relocations into a smaller set
+// of offset and addend delta pairs, prefixed with a header indicating the
+// count of pairs. The second is signed LEB128 encoding, which compacts
+// the result of delta encoding.
+//
+// Once packed, data is prefixed by an identifier that allows for any later
+// versioning of packing strategies.
+//
+// A complete packed stream might look something like:
+//
+// "APA1" pairs offset_d1 addend_d1 offset_d2 addend_d2 ...
+// 41505232 f2b018 04 28 08 9f01 ...
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_PACKER_H_
+#define TOOLS_RELOCATION_PACKER_SRC_PACKER_H_
+
+#include <stdint.h>
+#include <vector>
+
+#include "elf.h"
+
+namespace relocation_packer {
+
+// A RelocationPacker packs vectors of relocations into more
+// compact forms, and unpacks them to reproduce the pre-packed data.
+template <typename ELF>
+class RelocationPacker {
+ public:
+ // Pack relocations into a more compact form.
+ // |relocations| is a vector of relocation structs.
+ // |packed| is the vector of packed bytes into which relocations are packed.
+ static void PackRelocations(const std::vector<typename ELF::Rela>& relocations,
+ std::vector<uint8_t>* packed);
+
+ // Unpack relocations from their more compact form.
+ // |packed| is the vector of packed relocations.
+ // |relocations| is a vector of unpacked relocation structs.
+ static void UnpackRelocations(const std::vector<uint8_t>& packed,
+ std::vector<typename ELF::Rela>* relocations);
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_PACKER_H_
diff --git a/tools/relocation_packer/src/packer_unittest.cc b/tools/relocation_packer/src/packer_unittest.cc
new file mode 100644
index 0000000..8dddd8b
--- /dev/null
+++ b/tools/relocation_packer/src/packer_unittest.cc
@@ -0,0 +1,292 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "packer.h"
+
+#include <vector>
+#include "elf.h"
+#include "elf_traits.h"
+#include "gtest/gtest.h"
+
+
+template <typename ELF>
+static void AddRelocation(typename ELF::Addr addr,
+ typename ELF::Xword info,
+ typename ELF::Sxword addend,
+ std::vector<typename ELF::Rela>* relocations) {
+ typename ELF::Rela relocation;
+ relocation.r_offset = addr;
+ relocation.r_info = info;
+ relocation.r_addend = addend;
+
+ relocations->push_back(relocation);
+}
+
+template <typename ELF>
+static bool CheckRelocation(typename ELF::Addr addr,
+ typename ELF::Xword info,
+ typename ELF::Sxword addend,
+ const typename ELF::Rela& relocation) {
+ return relocation.r_offset == addr &&
+ relocation.r_info == info &&
+ relocation.r_addend == addend;
+}
+
+namespace relocation_packer {
+
+template <typename ELF>
+static void DoPackNoAddend() {
+ std::vector<typename ELF::Rela> relocations;
+ std::vector<uint8_t> packed;
+ // Initial relocation.
+ AddRelocation<ELF>(0xd1ce0000, 0x11, 0, &relocations);
+ // Two more relocations, 4 byte deltas.
+ AddRelocation<ELF>(0xd1ce0004, 0x11, 0, &relocations);
+ AddRelocation<ELF>(0xd1ce0008, 0x11, 0, &relocations);
+ // Three more relocations, 8 byte deltas.
+ AddRelocation<ELF>(0xd1ce0010, 0x11, 0, &relocations);
+ AddRelocation<ELF>(0xd1ce0018, 0x11, 0, &relocations);
+ AddRelocation<ELF>(0xd1ce0020, 0x11, 0, &relocations);
+
+ RelocationPacker<ELF> packer;
+
+ packed.clear();
+ packer.PackRelocations(relocations, &packed);
+
+ ASSERT_EQ(18U, packed.size());
+ // Identifier.
+ size_t ndx = 0;
+ EXPECT_EQ('A', packed[ndx++]);
+ EXPECT_EQ('P', packed[ndx++]);
+ EXPECT_EQ('U', packed[ndx++]);
+ EXPECT_EQ('2', packed[ndx++]);
+ // relocation count
+ EXPECT_EQ(6, packed[ndx++]);
+ // base relocation = 0xd1cdfffc -> fc, ff, b7, 8e, 0d
+ EXPECT_EQ(0xfc, packed[ndx++]);
+ EXPECT_EQ(0xff, packed[ndx++]);
+ EXPECT_EQ(0xb7, packed[ndx++]);
+ EXPECT_EQ(0x8e, packed[ndx++]);
+ EXPECT_EQ(0x0d, packed[ndx++]);
+ // first group
+ EXPECT_EQ(3, packed[ndx++]); // size
+ EXPECT_EQ(3, packed[ndx++]); // flags
+ EXPECT_EQ(4, packed[ndx++]); // r_offset_delta
+ EXPECT_EQ(0x11, packed[ndx++]); // r_info
+ // second group
+ EXPECT_EQ(3, packed[ndx++]); // size
+ EXPECT_EQ(3, packed[ndx++]); // flags
+ EXPECT_EQ(8, packed[ndx++]); // r_offset_delta
+ EXPECT_EQ(0x11, packed[ndx++]); // r_info
+
+ EXPECT_EQ(ndx, packed.size());
+}
+
+TEST(Packer, PackNoAddend) {
+ DoPackNoAddend<ELF32_traits>();
+ DoPackNoAddend<ELF64_traits>();
+}
+
+template <typename ELF>
+static void DoUnpackNoAddend() {
+ std::vector<typename ELF::Rela> relocations;
+ std::vector<uint8_t> packed;
+ packed.push_back('A');
+ packed.push_back('P');
+ packed.push_back('U');
+ packed.push_back('2');
+ // relocation count
+ packed.push_back(6);
+ // base relocation = 0xd1cdfffc -> fc, ff, b7, 8e, 0d
+ packed.push_back(0xfc);
+ packed.push_back(0xff);
+ packed.push_back(0xb7);
+ packed.push_back(0x8e);
+ packed.push_back(0x0d);
+ // first group
+ packed.push_back(3); // size
+ packed.push_back(3); // flags
+ packed.push_back(4); // r_offset_delta
+ packed.push_back(0x11); // r_info
+ // second group
+ packed.push_back(3); // size
+ packed.push_back(3); // flags
+ packed.push_back(8); // r_offset_delta
+ packed.push_back(0x11); // r_info
+
+ RelocationPacker<ELF> packer;
+ packer.UnpackRelocations(packed, &relocations);
+
+ size_t ndx = 0;
+ EXPECT_EQ(6U, relocations.size());
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0000, 0x11, 0, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0004, 0x11, 0, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0008, 0x11, 0, relocations[ndx++]));
+
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0010, 0x11, 0, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0018, 0x11, 0, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0020, 0x11, 0, relocations[ndx++]));
+
+ EXPECT_EQ(ndx, relocations.size());
+}
+
+TEST(Packer, UnpackNoAddend) {
+ DoUnpackNoAddend<ELF32_traits>();
+ DoUnpackNoAddend<ELF64_traits>();
+}
+
+template <typename ELF>
+static void DoPackWithAddend() {
+ std::vector<typename ELF::Rela> relocations;
+
+ // Initial relocation.
+ AddRelocation<ELF>(0xd1ce0000, 0x01, 10024, &relocations);
+ // Two more relocations, 4 byte offset deltas, 12 byte addend deltas.
+ AddRelocation<ELF>(0xd1ce0004, 0x01, 10012, &relocations);
+ AddRelocation<ELF>(0xd1ce0008, 0x01, 10024, &relocations);
+ // Three more relocations, 8 byte deltas, -24 byte addend deltas.
+ AddRelocation<ELF>(0xd1ce0010, 0x01, 10000, &relocations);
+ AddRelocation<ELF>(0xd1ce0018, 0x01, 9976, &relocations);
+ AddRelocation<ELF>(0xd1ce0020, 0x01, 9952, &relocations);
+
+ std::vector<uint8_t> packed;
+
+ RelocationPacker<ELF> packer;
+
+ packed.clear();
+ packer.PackRelocations(relocations, &packed);
+
+ EXPECT_EQ(26U, packed.size());
+ size_t ndx = 0;
+ // Identifier.
+ EXPECT_EQ('A', packed[ndx++]);
+ EXPECT_EQ('P', packed[ndx++]);
+ EXPECT_EQ('S', packed[ndx++]);
+ EXPECT_EQ('2', packed[ndx++]);
+ // Relocation count
+ EXPECT_EQ(6U, packed[ndx++]);
+ // base relocation = 0xd1cdfffc -> fc, ff, b7, 8e, 0d/7d (depending on ELF::Addr)
+ EXPECT_EQ(0xfc, packed[ndx++]);
+ EXPECT_EQ(0xff, packed[ndx++]);
+ EXPECT_EQ(0xb7, packed[ndx++]);
+ EXPECT_EQ(0x8e, packed[ndx++]);
+ if (sizeof(typename ELF::Addr) == 8) {
+ // positive for uint64_t
+ EXPECT_EQ(0x0d, packed[ndx++]);
+ } else {
+ // negative for uint32_t
+ EXPECT_EQ(0x7d, packed[ndx++]);
+ }
+ // group 1
+ EXPECT_EQ(0x03, packed[ndx++]); // size
+ EXPECT_EQ(0x0b, packed[ndx++]); // flags
+ EXPECT_EQ(0x04, packed[ndx++]); // r_offset_delta
+ EXPECT_EQ(0x01, packed[ndx++]); // r_info
+ // group 1 - addend 1: 10024 = 0xa8, 0xce, 0x80
+ EXPECT_EQ(0xa8, packed[ndx++]);
+ EXPECT_EQ(0xce, packed[ndx++]);
+ EXPECT_EQ(0x00, packed[ndx++]);
+ // group 1 - addend 2: -12 = 0x74
+ EXPECT_EQ(0x74, packed[ndx++]);
+ // group 1 - addend 3: +12 = 0x0c
+ EXPECT_EQ(0x0c, packed[ndx++]);
+
+ // group 2
+ EXPECT_EQ(0x03, packed[ndx++]); // size
+ EXPECT_EQ(0x0b, packed[ndx++]); // flags
+ EXPECT_EQ(0x08, packed[ndx++]); // r_offset_delta
+ EXPECT_EQ(0x01, packed[ndx++]); // r_info
+
+ // group 2 - addend 1: -24 = 0x68
+ EXPECT_EQ(0x68, packed[ndx++]);
+ // group 2 - addend 2: -24 = 0x68
+ EXPECT_EQ(0x68, packed[ndx++]);
+ // group 2 - addend 3: -24 = 0x68
+ EXPECT_EQ(0x68, packed[ndx++]);
+
+ EXPECT_EQ(ndx, packed.size());
+}
+
+TEST(Packer, PackWithAddend) {
+ DoPackWithAddend<ELF32_traits>();
+ DoPackWithAddend<ELF64_traits>();
+}
+
+template <typename ELF>
+static void DoUnpackWithAddend() {
+ std::vector<uint8_t> packed;
+ // Identifier.
+ packed.push_back('A');
+ packed.push_back('P');
+ packed.push_back('S');
+ packed.push_back('2');
+ // Relocation count
+ packed.push_back(6U);
+ // base relocation = 0xd1cdfffc -> fc, ff, b7, 8e, 0d
+ packed.push_back(0xfc);
+ packed.push_back(0xff);
+ packed.push_back(0xb7);
+ packed.push_back(0x8e);
+ if (sizeof(typename ELF::Addr) == 8) {
+ // positive for uint64_t
+ packed.push_back(0x0d);
+ } else {
+ // negative for uint32_t
+ packed.push_back(0x7d);
+ }
+ // group 1
+ packed.push_back(0x03); // size
+ packed.push_back(0x0b); // flags
+ packed.push_back(0x04); // r_offset_delta
+ packed.push_back(0x01); // r_info
+ // group 1 - addend 1: 10024 = 0xa8, 0xce, 0x80
+ packed.push_back(0xa8);
+ packed.push_back(0xce);
+ packed.push_back(0x00);
+ // group 1 - addend 2: -12 = 0x74
+ packed.push_back(0x74);
+ // group 1 - addend 3: +12 = 0x0c
+ packed.push_back(0x0c);
+
+ // group 2
+ packed.push_back(0x03); // size
+ packed.push_back(0x0b); // flags
+ packed.push_back(0x08); // r_offset_delta
+ packed.push_back(0x01); // r_info
+
+ // group 2 - addend 1: -24 = 0x68
+ packed.push_back(0x68);
+ // group 2 - addend 2: -24 = 0x68
+ packed.push_back(0x68);
+ // group 2 - addend 3: -24 = 0x68
+ packed.push_back(0x68);
+
+ std::vector<typename ELF::Rela> relocations;
+
+ RelocationPacker<ELF> packer;
+
+ relocations.clear();
+ packer.UnpackRelocations(packed, &relocations);
+
+ EXPECT_EQ(6U, relocations.size());
+ size_t ndx = 0;
+ // Initial relocation.
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0000, 0x01, 10024, relocations[ndx++]));
+ // Two more relocations, 4 byte offset deltas, 12 byte addend deltas.
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0004, 0x01, 10012, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0008, 0x01, 10024, relocations[ndx++]));
+ // Three more relocations, 8 byte offset deltas, -24 byte addend deltas.
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0010, 0x01, 10000, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0018, 0x01, 9976, relocations[ndx++]));
+ EXPECT_TRUE(CheckRelocation<ELF>(0xd1ce0020, 0x01, 9952, relocations[ndx++]));
+
+ EXPECT_EQ(ndx, relocations.size());
+}
+
+TEST(Packer, UnpackWithAddend) {
+ DoUnpackWithAddend<ELF32_traits>();
+ DoUnpackWithAddend<ELF64_traits>();
+}
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/run_length_encoder.h b/tools/relocation_packer/src/run_length_encoder.h
new file mode 100644
index 0000000..f3a80e6
--- /dev/null
+++ b/tools/relocation_packer/src/run_length_encoder.h
@@ -0,0 +1,81 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Run-length encode and decode relative relocations.
+//
+// Relative relocations are the bulk of dynamic relocations (the
+// .rel.dyn or .rela.dyn sections) in libchrome.<version>.so, and the ELF
+// standard representation of them is wasteful. .rel.dyn contains
+// relocations without addends, .rela.dyn relocations with addends.
+//
+// A relocation with no addend is 8 bytes on 32 bit platforms and 16 bytes
+// on 64 bit plaforms, split into offset and info fields. Offsets strictly
+// increase, and each is commonly a few bytes different from its predecessor.
+// There are long runs where the difference does not change. The info field
+// is constant. Example, from 'readelf -x4 libchrome.<version>.so' 32 bit:
+//
+// offset info offset info
+// 808fef01 17000000 848fef01 17000000 ................
+// 888fef01 17000000 8c8fef01 17000000 ................
+// 908fef01 17000000 948fef01 17000000 ................
+//
+// Run length encoding packs this data more efficiently, by representing it
+// as a delta and a count of entries each differing from its predecessor
+// by this delta. The above can be represented as a start address followed
+// by an encoded count of 6 and offset difference of 4:
+//
+// start count diff
+// 01ef8f80 00000006 00000004
+//
+// Because relative relocation offsets strictly increase, the complete
+// set of relative relocations in libchrome.<version>.so can be
+// represented by a single start address followed by one or more difference
+// and count encoded word pairs:
+//
+// start run1 count run1 diff run2 count run2 diff
+// 01ef8f80 00000006 00000004 00000010 00000008 ...
+//
+// Decoding regenerates relative relocations beginning at address
+// 'start' and for each encoded run, incrementing the address by 'difference'
+// for 'count' iterations and emitting a new relative relocation.
+//
+// Once encoded, data is prefixed by a single word count of packed delta and
+// count pairs. A final run-length encoded relative relocations vector
+// might therefore look something like:
+//
+// pairs start run 1 run 2 ... run 15
+// 0000000f 01ef8f80 00000006 00000004 00000010 00000008 ...
+// Interpreted as:
+// pairs=15 start=.. count=6,delta=4 count=16,delta=8
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_RUN_LENGTH_ENCODER_H_
+#define TOOLS_RELOCATION_PACKER_SRC_RUN_LENGTH_ENCODER_H_
+
+#include <vector>
+
+#include "elf.h"
+#include "elf_traits.h"
+
+namespace relocation_packer {
+
+// A RelocationRunLengthCodec packs vectors of relative relocations
+// into more compact forms, and unpacks them to reproduce the pre-packed data.
+class RelocationRunLengthCodec {
+ public:
+ // Encode relative relocations into a more compact form.
+ // |relocations| is a vector of relative relocation structs.
+ // |packed| is the vector of packed words into which relocations are packed.
+ static void Encode(const std::vector<ELF::Rel>& relocations,
+ std::vector<ELF::Xword>* packed);
+
+ // Decode relative relocations from their more compact form.
+ // |packed| is the vector of packed relocations.
+ // |relocations| is a vector of unpacked relative relocation structs.
+ static void Decode(const std::vector<ELF::Xword>& packed,
+ std::vector<ELF::Rel>* relocations);
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_RUN_LENGTH_ENCODER_H_
diff --git a/tools/relocation_packer/src/sleb128.cc b/tools/relocation_packer/src/sleb128.cc
new file mode 100644
index 0000000..12c21e3
--- /dev/null
+++ b/tools/relocation_packer/src/sleb128.cc
@@ -0,0 +1,131 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sleb128.h"
+
+#include <limits.h>
+#include <stdint.h>
+#include <vector>
+
+#include "elf_traits.h"
+
+namespace {
+
+template <typename T>
+class uint_traits {};
+
+template <>
+class uint_traits<uint64_t> {
+ public:
+ typedef int64_t int_t;
+};
+
+template <>
+class uint_traits<uint32_t> {
+ public:
+ typedef int32_t int_t;
+};
+
+}
+
+namespace relocation_packer {
+
+// Empty constructor and destructor to silence chromium-style.
+template <typename uint_t>
+Sleb128Encoder<uint_t>::Sleb128Encoder() { }
+
+template <typename uint_t>
+Sleb128Encoder<uint_t>::~Sleb128Encoder() { }
+
+// Add a single value to the encoding. Values are encoded with variable
+// length. The least significant 7 bits of each byte hold 7 bits of data,
+// and the most significant bit is set on each byte except the last. The
+// value is sign extended up to a multiple of 7 bits (ensuring that the
+// most significant bit is zero for a positive number and one for a
+// negative number).
+template <typename uint_t>
+void Sleb128Encoder<uint_t>::Enqueue(uint_t value) {
+ typedef typename uint_traits<uint_t>::int_t int_t;
+ static const size_t size = CHAR_BIT * sizeof(value);
+
+ bool more = true;
+ const bool negative = static_cast<int_t>(value) < 0;
+
+ while (more) {
+ uint8_t byte = value & 127;
+ value >>= 7;
+
+ // Sign extend if encoding a -ve value.
+ if (negative)
+ value |= -(static_cast<uint_t>(1) << (size - 7));
+
+ // The sign bit of byte is second high order bit.
+ const bool sign_bit = byte & 64;
+ if ((value == 0 && !sign_bit) || (value == static_cast<uint_t>(-1) && sign_bit))
+ more = false;
+ else
+ byte |= 128;
+ encoding_.push_back(byte);
+ }
+}
+
+// Add a vector of values to the encoding.
+template <typename uint_t>
+void Sleb128Encoder<uint_t>::EnqueueAll(const std::vector<uint_t>& values) {
+ for (size_t i = 0; i < values.size(); ++i) {
+ Enqueue(values[i]);
+ }
+}
+
+// Create a new decoder for the given encoded stream.
+template <typename uint_t>
+Sleb128Decoder<uint_t>::Sleb128Decoder(const std::vector<uint8_t>& encoding, size_t start_with) {
+ encoding_ = encoding;
+ cursor_ = start_with;
+}
+
+// Empty destructor to silence chromium-style.
+template <typename uint_t>
+Sleb128Decoder<uint_t>::~Sleb128Decoder() { }
+
+// Decode and retrieve a single value from the encoding. Consume bytes
+// until one without its most significant bit is found, and re-form the
+// value from the 7 bit fields of the bytes consumed.
+template <typename uint_t>
+uint_t Sleb128Decoder<uint_t>::Dequeue() {
+ uint_t value = 0;
+ static const size_t size = CHAR_BIT * sizeof(value);
+
+ size_t shift = 0;
+ uint8_t byte;
+
+ // Loop until we reach a byte with its high order bit clear.
+ do {
+ byte = encoding_[cursor_++];
+ value |= (static_cast<uint_t>(byte & 127) << shift);
+ shift += 7;
+ } while (byte & 128);
+
+ // The sign bit is second high order bit of the final byte decoded.
+ // Sign extend if value is -ve and we did not shift all of it.
+ if (shift < size && (byte & 64))
+ value |= -(static_cast<uint_t>(1) << shift);
+
+ return static_cast<uint_t>(value);
+}
+
+// Decode and retrieve all remaining values from the encoding.
+template <typename uint_t>
+void Sleb128Decoder<uint_t>::DequeueAll(std::vector<uint_t>* values) {
+ while (cursor_ < encoding_.size()) {
+ values->push_back(Dequeue());
+ }
+}
+
+template class Sleb128Encoder<uint32_t>;
+template class Sleb128Encoder<uint64_t>;
+template class Sleb128Decoder<uint32_t>;
+template class Sleb128Decoder<uint64_t>;
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/src/sleb128.h b/tools/relocation_packer/src/sleb128.h
new file mode 100644
index 0000000..fa0a246
--- /dev/null
+++ b/tools/relocation_packer/src/sleb128.h
@@ -0,0 +1,77 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// SLEB128 encoder and decoder for packed relative relocations.
+//
+// Delta encoded relative relocations consist of a large number
+// of pairs signed integer values, many with small values. Encoding these
+// as signed LEB128 saves space.
+//
+// For more on LEB128 see http://en.wikipedia.org/wiki/LEB128.
+
+#ifndef TOOLS_RELOCATION_PACKER_SRC_SLEB128_H_
+#define TOOLS_RELOCATION_PACKER_SRC_SLEB128_H_
+
+#include <stdint.h>
+#include <unistd.h>
+#include <vector>
+
+#include "elf_traits.h"
+
+namespace relocation_packer {
+
+// Encode packed words as a signed LEB128 byte stream.
+template<typename int_t>
+class Sleb128Encoder {
+ public:
+ // Explicit (but empty) constructor and destructor, for chromium-style.
+ Sleb128Encoder();
+ ~Sleb128Encoder();
+
+ // Add a value to the encoding stream.
+ // |value| is the signed int to add.
+ void Enqueue(int_t value);
+
+ // Add a vector of values to the encoding stream.
+ // |values| is the vector of signed ints to add.
+ void EnqueueAll(const std::vector<int_t>& values);
+
+ // Retrieve the encoded representation of the values.
+ // |encoding| is the returned vector of encoded data.
+ void GetEncoding(std::vector<uint8_t>* encoding) { *encoding = encoding_; }
+
+ private:
+ // Growable vector holding the encoded LEB128 stream.
+ std::vector<uint8_t> encoding_;
+};
+
+// Decode a LEB128 byte stream to produce packed words.
+template <typename int_t>
+class Sleb128Decoder {
+ public:
+ // Create a new decoder for the given encoded stream.
+ // |encoding| is the vector of encoded data.
+ explicit Sleb128Decoder(const std::vector<uint8_t>& encoding, size_t start_with);
+
+ // Explicit (but empty) destructor, for chromium-style.
+ ~Sleb128Decoder();
+
+ // Retrieve the next value from the encoded stream.
+ int_t Dequeue();
+
+ // Retrieve all remaining values from the encoded stream.
+ // |values| is the vector of decoded data.
+ void DequeueAll(std::vector<int_t>* values);
+
+ private:
+ // Encoded LEB128 stream.
+ std::vector<uint8_t> encoding_;
+
+ // Cursor indicating the current stream retrieval point.
+ size_t cursor_;
+};
+
+} // namespace relocation_packer
+
+#endif // TOOLS_RELOCATION_PACKER_SRC_SLEB128_H_
diff --git a/tools/relocation_packer/src/sleb128_unittest.cc b/tools/relocation_packer/src/sleb128_unittest.cc
new file mode 100644
index 0000000..49a553c
--- /dev/null
+++ b/tools/relocation_packer/src/sleb128_unittest.cc
@@ -0,0 +1,166 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sleb128.h"
+
+#include <vector>
+#include "elf_traits.h"
+#include "gtest/gtest.h"
+
+namespace relocation_packer {
+
+TEST(Sleb128, Encoder64) {
+ std::vector<uint64_t> values;
+ values.push_back(624485U);
+ values.push_back(0U);
+ values.push_back(1U);
+ values.push_back(63U);
+ values.push_back(64U);
+ values.push_back(static_cast<uint64_t>(-1));
+ values.push_back(static_cast<uint64_t>(-624485));
+
+ Sleb128Encoder<uint64_t> encoder;
+ encoder.EnqueueAll(values);
+
+ encoder.Enqueue(2147483647U);
+ encoder.Enqueue(static_cast<uint64_t>(-2147483648));
+ encoder.Enqueue(9223372036854775807ULL);
+ encoder.Enqueue(static_cast<uint64_t>(-9223372036854775807LL - 1));
+
+ std::vector<uint8_t> encoding;
+ encoder.GetEncoding(&encoding);
+
+ EXPECT_EQ(42u, encoding.size());
+ // 624485
+ EXPECT_EQ(0xe5, encoding[0]);
+ EXPECT_EQ(0x8e, encoding[1]);
+ EXPECT_EQ(0x26, encoding[2]);
+ // 0
+ EXPECT_EQ(0x00, encoding[3]);
+ // 1
+ EXPECT_EQ(0x01, encoding[4]);
+ // 63
+ EXPECT_EQ(0x3f, encoding[5]);
+ // 64
+ EXPECT_EQ(0xc0, encoding[6]);
+ EXPECT_EQ(0x00, encoding[7]);
+ // -1
+ EXPECT_EQ(0x7f, encoding[8]);
+ // -624485
+ EXPECT_EQ(0x9b, encoding[9]);
+ EXPECT_EQ(0xf1, encoding[10]);
+ EXPECT_EQ(0x59, encoding[11]);
+ // 2147483647
+ EXPECT_EQ(0xff, encoding[12]);
+ EXPECT_EQ(0xff, encoding[13]);
+ EXPECT_EQ(0xff, encoding[14]);
+ EXPECT_EQ(0xff, encoding[15]);
+ EXPECT_EQ(0x07, encoding[16]);
+ // -2147483648
+ EXPECT_EQ(0x80, encoding[17]);
+ EXPECT_EQ(0x80, encoding[18]);
+ EXPECT_EQ(0x80, encoding[19]);
+ EXPECT_EQ(0x80, encoding[20]);
+ EXPECT_EQ(0x78, encoding[21]);
+ // 9223372036854775807
+ EXPECT_EQ(0xff, encoding[22]);
+ EXPECT_EQ(0xff, encoding[23]);
+ EXPECT_EQ(0xff, encoding[24]);
+ EXPECT_EQ(0xff, encoding[25]);
+ EXPECT_EQ(0xff, encoding[26]);
+ EXPECT_EQ(0xff, encoding[27]);
+ EXPECT_EQ(0xff, encoding[28]);
+ EXPECT_EQ(0xff, encoding[29]);
+ EXPECT_EQ(0xff, encoding[30]);
+ EXPECT_EQ(0x00, encoding[31]);
+ // -9223372036854775808
+ EXPECT_EQ(0x80, encoding[32]);
+ EXPECT_EQ(0x80, encoding[33]);
+ EXPECT_EQ(0x80, encoding[34]);
+ EXPECT_EQ(0x80, encoding[35]);
+ EXPECT_EQ(0x80, encoding[36]);
+ EXPECT_EQ(0x80, encoding[37]);
+ EXPECT_EQ(0x80, encoding[38]);
+ EXPECT_EQ(0x80, encoding[39]);
+ EXPECT_EQ(0x80, encoding[40]);
+ EXPECT_EQ(0x7f, encoding[41]);
+}
+
+TEST(Sleb128, Decoder) {
+ std::vector<uint8_t> encoding;
+ // 624485
+ encoding.push_back(0xe5);
+ encoding.push_back(0x8e);
+ encoding.push_back(0x26);
+ // 0
+ encoding.push_back(0x00);
+ // 1
+ encoding.push_back(0x01);
+ // 63
+ encoding.push_back(0x3f);
+ // 64
+ encoding.push_back(0xc0);
+ encoding.push_back(0x00);
+ // -1
+ encoding.push_back(0x7f);
+ // -624485
+ encoding.push_back(0x9b);
+ encoding.push_back(0xf1);
+ encoding.push_back(0x59);
+ // 2147483647
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0x07);
+ // -2147483648
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x78);
+ // 9223372036854775807
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0xff);
+ encoding.push_back(0x00);
+ // -9223372036854775808
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x80);
+ encoding.push_back(0x7f);
+
+ Sleb128Decoder<uint64_t> decoder(encoding, 0);
+
+ EXPECT_EQ(624485U, decoder.Dequeue());
+
+ std::vector<uint64_t> dequeued;
+ decoder.DequeueAll(&dequeued);
+
+ EXPECT_EQ(10U, dequeued.size());
+ EXPECT_EQ(0U, dequeued[0]);
+ EXPECT_EQ(1U, dequeued[1]);
+ EXPECT_EQ(63U, dequeued[2]);
+ EXPECT_EQ(64U, dequeued[3]);
+ EXPECT_EQ(static_cast<uint64_t>(-1), dequeued[4]);
+ EXPECT_EQ(static_cast<uint64_t>(-624485), dequeued[5]);
+ EXPECT_EQ(2147483647U, dequeued[6]);
+ EXPECT_EQ(static_cast<uint64_t>(-2147483648), dequeued[7]);
+ EXPECT_EQ(9223372036854775807ULL, dequeued[8]);
+ EXPECT_EQ(static_cast<uint64_t>(-9223372036854775807LL - 1), dequeued[9]);
+}
+
+} // namespace relocation_packer
diff --git a/tools/relocation_packer/test_data/elf_file_unittest_relocs.cc b/tools/relocation_packer/test_data/elf_file_unittest_relocs.cc
new file mode 100644
index 0000000..5e1fa74
--- /dev/null
+++ b/tools/relocation_packer/test_data/elf_file_unittest_relocs.cc
@@ -0,0 +1,1014 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Test data for packing/unpacking. When compiled, creates a run of
+// relative relocations.
+//
+// See generate_elf_file_unittest_relocs.sh for instructions on how to build
+// unit test data from this source file.
+
+const int i = 0;
+
+// Generator:
+// python -c 'for i in xrange(0,1000):print"const void* pointer_%d = &i;"%i'
+const void* pointer_0 = &i;
+const void* pointer_1 = &i;
+const void* pointer_2 = &i;
+const void* pointer_3 = &i;
+const void* pointer_4 = &i;
+const void* pointer_5 = &i;
+const void* pointer_6 = &i;
+const void* pointer_7 = &i;
+const void* pointer_8 = &i;
+const void* pointer_9 = &i;
+const void* pointer_10 = &i;
+const void* pointer_11 = &i;
+const void* pointer_12 = &i;
+const void* pointer_13 = &i;
+const void* pointer_14 = &i;
+const void* pointer_15 = &i;
+const void* pointer_16 = &i;
+const void* pointer_17 = &i;
+const void* pointer_18 = &i;
+const void* pointer_19 = &i;
+const void* pointer_20 = &i;
+const void* pointer_21 = &i;
+const void* pointer_22 = &i;
+const void* pointer_23 = &i;
+const void* pointer_24 = &i;
+const void* pointer_25 = &i;
+const void* pointer_26 = &i;
+const void* pointer_27 = &i;
+const void* pointer_28 = &i;
+const void* pointer_29 = &i;
+const void* pointer_30 = &i;
+const void* pointer_31 = &i;
+const void* pointer_32 = &i;
+const void* pointer_33 = &i;
+const void* pointer_34 = &i;
+const void* pointer_35 = &i;
+const void* pointer_36 = &i;
+const void* pointer_37 = &i;
+const void* pointer_38 = &i;
+const void* pointer_39 = &i;
+const void* pointer_40 = &i;
+const void* pointer_41 = &i;
+const void* pointer_42 = &i;
+const void* pointer_43 = &i;
+const void* pointer_44 = &i;
+const void* pointer_45 = &i;
+const void* pointer_46 = &i;
+const void* pointer_47 = &i;
+const void* pointer_48 = &i;
+const void* pointer_49 = &i;
+const void* pointer_50 = &i;
+const void* pointer_51 = &i;
+const void* pointer_52 = &i;
+const void* pointer_53 = &i;
+const void* pointer_54 = &i;
+const void* pointer_55 = &i;
+const void* pointer_56 = &i;
+const void* pointer_57 = &i;
+const void* pointer_58 = &i;
+const void* pointer_59 = &i;
+const void* pointer_60 = &i;
+const void* pointer_61 = &i;
+const void* pointer_62 = &i;
+const void* pointer_63 = &i;
+const void* pointer_64 = &i;
+const void* pointer_65 = &i;
+const void* pointer_66 = &i;
+const void* pointer_67 = &i;
+const void* pointer_68 = &i;
+const void* pointer_69 = &i;
+const void* pointer_70 = &i;
+const void* pointer_71 = &i;
+const void* pointer_72 = &i;
+const void* pointer_73 = &i;
+const void* pointer_74 = &i;
+const void* pointer_75 = &i;
+const void* pointer_76 = &i;
+const void* pointer_77 = &i;
+const void* pointer_78 = &i;
+const void* pointer_79 = &i;
+const void* pointer_80 = &i;
+const void* pointer_81 = &i;
+const void* pointer_82 = &i;
+const void* pointer_83 = &i;
+const void* pointer_84 = &i;
+const void* pointer_85 = &i;
+const void* pointer_86 = &i;
+const void* pointer_87 = &i;
+const void* pointer_88 = &i;
+const void* pointer_89 = &i;
+const void* pointer_90 = &i;
+const void* pointer_91 = &i;
+const void* pointer_92 = &i;
+const void* pointer_93 = &i;
+const void* pointer_94 = &i;
+const void* pointer_95 = &i;
+const void* pointer_96 = &i;
+const void* pointer_97 = &i;
+const void* pointer_98 = &i;
+const void* pointer_99 = &i;
+const void* pointer_100 = &i;
+const void* pointer_101 = &i;
+const void* pointer_102 = &i;
+const void* pointer_103 = &i;
+const void* pointer_104 = &i;
+const void* pointer_105 = &i;
+const void* pointer_106 = &i;
+const void* pointer_107 = &i;
+const void* pointer_108 = &i;
+const void* pointer_109 = &i;
+const void* pointer_110 = &i;
+const void* pointer_111 = &i;
+const void* pointer_112 = &i;
+const void* pointer_113 = &i;
+const void* pointer_114 = &i;
+const void* pointer_115 = &i;
+const void* pointer_116 = &i;
+const void* pointer_117 = &i;
+const void* pointer_118 = &i;
+const void* pointer_119 = &i;
+const void* pointer_120 = &i;
+const void* pointer_121 = &i;
+const void* pointer_122 = &i;
+const void* pointer_123 = &i;
+const void* pointer_124 = &i;
+const void* pointer_125 = &i;
+const void* pointer_126 = &i;
+const void* pointer_127 = &i;
+const void* pointer_128 = &i;
+const void* pointer_129 = &i;
+const void* pointer_130 = &i;
+const void* pointer_131 = &i;
+const void* pointer_132 = &i;
+const void* pointer_133 = &i;
+const void* pointer_134 = &i;
+const void* pointer_135 = &i;
+const void* pointer_136 = &i;
+const void* pointer_137 = &i;
+const void* pointer_138 = &i;
+const void* pointer_139 = &i;
+const void* pointer_140 = &i;
+const void* pointer_141 = &i;
+const void* pointer_142 = &i;
+const void* pointer_143 = &i;
+const void* pointer_144 = &i;
+const void* pointer_145 = &i;
+const void* pointer_146 = &i;
+const void* pointer_147 = &i;
+const void* pointer_148 = &i;
+const void* pointer_149 = &i;
+const void* pointer_150 = &i;
+const void* pointer_151 = &i;
+const void* pointer_152 = &i;
+const void* pointer_153 = &i;
+const void* pointer_154 = &i;
+const void* pointer_155 = &i;
+const void* pointer_156 = &i;
+const void* pointer_157 = &i;
+const void* pointer_158 = &i;
+const void* pointer_159 = &i;
+const void* pointer_160 = &i;
+const void* pointer_161 = &i;
+const void* pointer_162 = &i;
+const void* pointer_163 = &i;
+const void* pointer_164 = &i;
+const void* pointer_165 = &i;
+const void* pointer_166 = &i;
+const void* pointer_167 = &i;
+const void* pointer_168 = &i;
+const void* pointer_169 = &i;
+const void* pointer_170 = &i;
+const void* pointer_171 = &i;
+const void* pointer_172 = &i;
+const void* pointer_173 = &i;
+const void* pointer_174 = &i;
+const void* pointer_175 = &i;
+const void* pointer_176 = &i;
+const void* pointer_177 = &i;
+const void* pointer_178 = &i;
+const void* pointer_179 = &i;
+const void* pointer_180 = &i;
+const void* pointer_181 = &i;
+const void* pointer_182 = &i;
+const void* pointer_183 = &i;
+const void* pointer_184 = &i;
+const void* pointer_185 = &i;
+const void* pointer_186 = &i;
+const void* pointer_187 = &i;
+const void* pointer_188 = &i;
+const void* pointer_189 = &i;
+const void* pointer_190 = &i;
+const void* pointer_191 = &i;
+const void* pointer_192 = &i;
+const void* pointer_193 = &i;
+const void* pointer_194 = &i;
+const void* pointer_195 = &i;
+const void* pointer_196 = &i;
+const void* pointer_197 = &i;
+const void* pointer_198 = &i;
+const void* pointer_199 = &i;
+const void* pointer_200 = &i;
+const void* pointer_201 = &i;
+const void* pointer_202 = &i;
+const void* pointer_203 = &i;
+const void* pointer_204 = &i;
+const void* pointer_205 = &i;
+const void* pointer_206 = &i;
+const void* pointer_207 = &i;
+const void* pointer_208 = &i;
+const void* pointer_209 = &i;
+const void* pointer_210 = &i;
+const void* pointer_211 = &i;
+const void* pointer_212 = &i;
+const void* pointer_213 = &i;
+const void* pointer_214 = &i;
+const void* pointer_215 = &i;
+const void* pointer_216 = &i;
+const void* pointer_217 = &i;
+const void* pointer_218 = &i;
+const void* pointer_219 = &i;
+const void* pointer_220 = &i;
+const void* pointer_221 = &i;
+const void* pointer_222 = &i;
+const void* pointer_223 = &i;
+const void* pointer_224 = &i;
+const void* pointer_225 = &i;
+const void* pointer_226 = &i;
+const void* pointer_227 = &i;
+const void* pointer_228 = &i;
+const void* pointer_229 = &i;
+const void* pointer_230 = &i;
+const void* pointer_231 = &i;
+const void* pointer_232 = &i;
+const void* pointer_233 = &i;
+const void* pointer_234 = &i;
+const void* pointer_235 = &i;
+const void* pointer_236 = &i;
+const void* pointer_237 = &i;
+const void* pointer_238 = &i;
+const void* pointer_239 = &i;
+const void* pointer_240 = &i;
+const void* pointer_241 = &i;
+const void* pointer_242 = &i;
+const void* pointer_243 = &i;
+const void* pointer_244 = &i;
+const void* pointer_245 = &i;
+const void* pointer_246 = &i;
+const void* pointer_247 = &i;
+const void* pointer_248 = &i;
+const void* pointer_249 = &i;
+const void* pointer_250 = &i;
+const void* pointer_251 = &i;
+const void* pointer_252 = &i;
+const void* pointer_253 = &i;
+const void* pointer_254 = &i;
+const void* pointer_255 = &i;
+const void* pointer_256 = &i;
+const void* pointer_257 = &i;
+const void* pointer_258 = &i;
+const void* pointer_259 = &i;
+const void* pointer_260 = &i;
+const void* pointer_261 = &i;
+const void* pointer_262 = &i;
+const void* pointer_263 = &i;
+const void* pointer_264 = &i;
+const void* pointer_265 = &i;
+const void* pointer_266 = &i;
+const void* pointer_267 = &i;
+const void* pointer_268 = &i;
+const void* pointer_269 = &i;
+const void* pointer_270 = &i;
+const void* pointer_271 = &i;
+const void* pointer_272 = &i;
+const void* pointer_273 = &i;
+const void* pointer_274 = &i;
+const void* pointer_275 = &i;
+const void* pointer_276 = &i;
+const void* pointer_277 = &i;
+const void* pointer_278 = &i;
+const void* pointer_279 = &i;
+const void* pointer_280 = &i;
+const void* pointer_281 = &i;
+const void* pointer_282 = &i;
+const void* pointer_283 = &i;
+const void* pointer_284 = &i;
+const void* pointer_285 = &i;
+const void* pointer_286 = &i;
+const void* pointer_287 = &i;
+const void* pointer_288 = &i;
+const void* pointer_289 = &i;
+const void* pointer_290 = &i;
+const void* pointer_291 = &i;
+const void* pointer_292 = &i;
+const void* pointer_293 = &i;
+const void* pointer_294 = &i;
+const void* pointer_295 = &i;
+const void* pointer_296 = &i;
+const void* pointer_297 = &i;
+const void* pointer_298 = &i;
+const void* pointer_299 = &i;
+const void* pointer_300 = &i;
+const void* pointer_301 = &i;
+const void* pointer_302 = &i;
+const void* pointer_303 = &i;
+const void* pointer_304 = &i;
+const void* pointer_305 = &i;
+const void* pointer_306 = &i;
+const void* pointer_307 = &i;
+const void* pointer_308 = &i;
+const void* pointer_309 = &i;
+const void* pointer_310 = &i;
+const void* pointer_311 = &i;
+const void* pointer_312 = &i;
+const void* pointer_313 = &i;
+const void* pointer_314 = &i;
+const void* pointer_315 = &i;
+const void* pointer_316 = &i;
+const void* pointer_317 = &i;
+const void* pointer_318 = &i;
+const void* pointer_319 = &i;
+const void* pointer_320 = &i;
+const void* pointer_321 = &i;
+const void* pointer_322 = &i;
+const void* pointer_323 = &i;
+const void* pointer_324 = &i;
+const void* pointer_325 = &i;
+const void* pointer_326 = &i;
+const void* pointer_327 = &i;
+const void* pointer_328 = &i;
+const void* pointer_329 = &i;
+const void* pointer_330 = &i;
+const void* pointer_331 = &i;
+const void* pointer_332 = &i;
+const void* pointer_333 = &i;
+const void* pointer_334 = &i;
+const void* pointer_335 = &i;
+const void* pointer_336 = &i;
+const void* pointer_337 = &i;
+const void* pointer_338 = &i;
+const void* pointer_339 = &i;
+const void* pointer_340 = &i;
+const void* pointer_341 = &i;
+const void* pointer_342 = &i;
+const void* pointer_343 = &i;
+const void* pointer_344 = &i;
+const void* pointer_345 = &i;
+const void* pointer_346 = &i;
+const void* pointer_347 = &i;
+const void* pointer_348 = &i;
+const void* pointer_349 = &i;
+const void* pointer_350 = &i;
+const void* pointer_351 = &i;
+const void* pointer_352 = &i;
+const void* pointer_353 = &i;
+const void* pointer_354 = &i;
+const void* pointer_355 = &i;
+const void* pointer_356 = &i;
+const void* pointer_357 = &i;
+const void* pointer_358 = &i;
+const void* pointer_359 = &i;
+const void* pointer_360 = &i;
+const void* pointer_361 = &i;
+const void* pointer_362 = &i;
+const void* pointer_363 = &i;
+const void* pointer_364 = &i;
+const void* pointer_365 = &i;
+const void* pointer_366 = &i;
+const void* pointer_367 = &i;
+const void* pointer_368 = &i;
+const void* pointer_369 = &i;
+const void* pointer_370 = &i;
+const void* pointer_371 = &i;
+const void* pointer_372 = &i;
+const void* pointer_373 = &i;
+const void* pointer_374 = &i;
+const void* pointer_375 = &i;
+const void* pointer_376 = &i;
+const void* pointer_377 = &i;
+const void* pointer_378 = &i;
+const void* pointer_379 = &i;
+const void* pointer_380 = &i;
+const void* pointer_381 = &i;
+const void* pointer_382 = &i;
+const void* pointer_383 = &i;
+const void* pointer_384 = &i;
+const void* pointer_385 = &i;
+const void* pointer_386 = &i;
+const void* pointer_387 = &i;
+const void* pointer_388 = &i;
+const void* pointer_389 = &i;
+const void* pointer_390 = &i;
+const void* pointer_391 = &i;
+const void* pointer_392 = &i;
+const void* pointer_393 = &i;
+const void* pointer_394 = &i;
+const void* pointer_395 = &i;
+const void* pointer_396 = &i;
+const void* pointer_397 = &i;
+const void* pointer_398 = &i;
+const void* pointer_399 = &i;
+const void* pointer_400 = &i;
+const void* pointer_401 = &i;
+const void* pointer_402 = &i;
+const void* pointer_403 = &i;
+const void* pointer_404 = &i;
+const void* pointer_405 = &i;
+const void* pointer_406 = &i;
+const void* pointer_407 = &i;
+const void* pointer_408 = &i;
+const void* pointer_409 = &i;
+const void* pointer_410 = &i;
+const void* pointer_411 = &i;
+const void* pointer_412 = &i;
+const void* pointer_413 = &i;
+const void* pointer_414 = &i;
+const void* pointer_415 = &i;
+const void* pointer_416 = &i;
+const void* pointer_417 = &i;
+const void* pointer_418 = &i;
+const void* pointer_419 = &i;
+const void* pointer_420 = &i;
+const void* pointer_421 = &i;
+const void* pointer_422 = &i;
+const void* pointer_423 = &i;
+const void* pointer_424 = &i;
+const void* pointer_425 = &i;
+const void* pointer_426 = &i;
+const void* pointer_427 = &i;
+const void* pointer_428 = &i;
+const void* pointer_429 = &i;
+const void* pointer_430 = &i;
+const void* pointer_431 = &i;
+const void* pointer_432 = &i;
+const void* pointer_433 = &i;
+const void* pointer_434 = &i;
+const void* pointer_435 = &i;
+const void* pointer_436 = &i;
+const void* pointer_437 = &i;
+const void* pointer_438 = &i;
+const void* pointer_439 = &i;
+const void* pointer_440 = &i;
+const void* pointer_441 = &i;
+const void* pointer_442 = &i;
+const void* pointer_443 = &i;
+const void* pointer_444 = &i;
+const void* pointer_445 = &i;
+const void* pointer_446 = &i;
+const void* pointer_447 = &i;
+const void* pointer_448 = &i;
+const void* pointer_449 = &i;
+const void* pointer_450 = &i;
+const void* pointer_451 = &i;
+const void* pointer_452 = &i;
+const void* pointer_453 = &i;
+const void* pointer_454 = &i;
+const void* pointer_455 = &i;
+const void* pointer_456 = &i;
+const void* pointer_457 = &i;
+const void* pointer_458 = &i;
+const void* pointer_459 = &i;
+const void* pointer_460 = &i;
+const void* pointer_461 = &i;
+const void* pointer_462 = &i;
+const void* pointer_463 = &i;
+const void* pointer_464 = &i;
+const void* pointer_465 = &i;
+const void* pointer_466 = &i;
+const void* pointer_467 = &i;
+const void* pointer_468 = &i;
+const void* pointer_469 = &i;
+const void* pointer_470 = &i;
+const void* pointer_471 = &i;
+const void* pointer_472 = &i;
+const void* pointer_473 = &i;
+const void* pointer_474 = &i;
+const void* pointer_475 = &i;
+const void* pointer_476 = &i;
+const void* pointer_477 = &i;
+const void* pointer_478 = &i;
+const void* pointer_479 = &i;
+const void* pointer_480 = &i;
+const void* pointer_481 = &i;
+const void* pointer_482 = &i;
+const void* pointer_483 = &i;
+const void* pointer_484 = &i;
+const void* pointer_485 = &i;
+const void* pointer_486 = &i;
+const void* pointer_487 = &i;
+const void* pointer_488 = &i;
+const void* pointer_489 = &i;
+const void* pointer_490 = &i;
+const void* pointer_491 = &i;
+const void* pointer_492 = &i;
+const void* pointer_493 = &i;
+const void* pointer_494 = &i;
+const void* pointer_495 = &i;
+const void* pointer_496 = &i;
+const void* pointer_497 = &i;
+const void* pointer_498 = &i;
+const void* pointer_499 = &i;
+const void* pointer_500 = &i;
+const void* pointer_501 = &i;
+const void* pointer_502 = &i;
+const void* pointer_503 = &i;
+const void* pointer_504 = &i;
+const void* pointer_505 = &i;
+const void* pointer_506 = &i;
+const void* pointer_507 = &i;
+const void* pointer_508 = &i;
+const void* pointer_509 = &i;
+const void* pointer_510 = &i;
+const void* pointer_511 = &i;
+const void* pointer_512 = &i;
+const void* pointer_513 = &i;
+const void* pointer_514 = &i;
+const void* pointer_515 = &i;
+const void* pointer_516 = &i;
+const void* pointer_517 = &i;
+const void* pointer_518 = &i;
+const void* pointer_519 = &i;
+const void* pointer_520 = &i;
+const void* pointer_521 = &i;
+const void* pointer_522 = &i;
+const void* pointer_523 = &i;
+const void* pointer_524 = &i;
+const void* pointer_525 = &i;
+const void* pointer_526 = &i;
+const void* pointer_527 = &i;
+const void* pointer_528 = &i;
+const void* pointer_529 = &i;
+const void* pointer_530 = &i;
+const void* pointer_531 = &i;
+const void* pointer_532 = &i;
+const void* pointer_533 = &i;
+const void* pointer_534 = &i;
+const void* pointer_535 = &i;
+const void* pointer_536 = &i;
+const void* pointer_537 = &i;
+const void* pointer_538 = &i;
+const void* pointer_539 = &i;
+const void* pointer_540 = &i;
+const void* pointer_541 = &i;
+const void* pointer_542 = &i;
+const void* pointer_543 = &i;
+const void* pointer_544 = &i;
+const void* pointer_545 = &i;
+const void* pointer_546 = &i;
+const void* pointer_547 = &i;
+const void* pointer_548 = &i;
+const void* pointer_549 = &i;
+const void* pointer_550 = &i;
+const void* pointer_551 = &i;
+const void* pointer_552 = &i;
+const void* pointer_553 = &i;
+const void* pointer_554 = &i;
+const void* pointer_555 = &i;
+const void* pointer_556 = &i;
+const void* pointer_557 = &i;
+const void* pointer_558 = &i;
+const void* pointer_559 = &i;
+const void* pointer_560 = &i;
+const void* pointer_561 = &i;
+const void* pointer_562 = &i;
+const void* pointer_563 = &i;
+const void* pointer_564 = &i;
+const void* pointer_565 = &i;
+const void* pointer_566 = &i;
+const void* pointer_567 = &i;
+const void* pointer_568 = &i;
+const void* pointer_569 = &i;
+const void* pointer_570 = &i;
+const void* pointer_571 = &i;
+const void* pointer_572 = &i;
+const void* pointer_573 = &i;
+const void* pointer_574 = &i;
+const void* pointer_575 = &i;
+const void* pointer_576 = &i;
+const void* pointer_577 = &i;
+const void* pointer_578 = &i;
+const void* pointer_579 = &i;
+const void* pointer_580 = &i;
+const void* pointer_581 = &i;
+const void* pointer_582 = &i;
+const void* pointer_583 = &i;
+const void* pointer_584 = &i;
+const void* pointer_585 = &i;
+const void* pointer_586 = &i;
+const void* pointer_587 = &i;
+const void* pointer_588 = &i;
+const void* pointer_589 = &i;
+const void* pointer_590 = &i;
+const void* pointer_591 = &i;
+const void* pointer_592 = &i;
+const void* pointer_593 = &i;
+const void* pointer_594 = &i;
+const void* pointer_595 = &i;
+const void* pointer_596 = &i;
+const void* pointer_597 = &i;
+const void* pointer_598 = &i;
+const void* pointer_599 = &i;
+const void* pointer_600 = &i;
+const void* pointer_601 = &i;
+const void* pointer_602 = &i;
+const void* pointer_603 = &i;
+const void* pointer_604 = &i;
+const void* pointer_605 = &i;
+const void* pointer_606 = &i;
+const void* pointer_607 = &i;
+const void* pointer_608 = &i;
+const void* pointer_609 = &i;
+const void* pointer_610 = &i;
+const void* pointer_611 = &i;
+const void* pointer_612 = &i;
+const void* pointer_613 = &i;
+const void* pointer_614 = &i;
+const void* pointer_615 = &i;
+const void* pointer_616 = &i;
+const void* pointer_617 = &i;
+const void* pointer_618 = &i;
+const void* pointer_619 = &i;
+const void* pointer_620 = &i;
+const void* pointer_621 = &i;
+const void* pointer_622 = &i;
+const void* pointer_623 = &i;
+const void* pointer_624 = &i;
+const void* pointer_625 = &i;
+const void* pointer_626 = &i;
+const void* pointer_627 = &i;
+const void* pointer_628 = &i;
+const void* pointer_629 = &i;
+const void* pointer_630 = &i;
+const void* pointer_631 = &i;
+const void* pointer_632 = &i;
+const void* pointer_633 = &i;
+const void* pointer_634 = &i;
+const void* pointer_635 = &i;
+const void* pointer_636 = &i;
+const void* pointer_637 = &i;
+const void* pointer_638 = &i;
+const void* pointer_639 = &i;
+const void* pointer_640 = &i;
+const void* pointer_641 = &i;
+const void* pointer_642 = &i;
+const void* pointer_643 = &i;
+const void* pointer_644 = &i;
+const void* pointer_645 = &i;
+const void* pointer_646 = &i;
+const void* pointer_647 = &i;
+const void* pointer_648 = &i;
+const void* pointer_649 = &i;
+const void* pointer_650 = &i;
+const void* pointer_651 = &i;
+const void* pointer_652 = &i;
+const void* pointer_653 = &i;
+const void* pointer_654 = &i;
+const void* pointer_655 = &i;
+const void* pointer_656 = &i;
+const void* pointer_657 = &i;
+const void* pointer_658 = &i;
+const void* pointer_659 = &i;
+const void* pointer_660 = &i;
+const void* pointer_661 = &i;
+const void* pointer_662 = &i;
+const void* pointer_663 = &i;
+const void* pointer_664 = &i;
+const void* pointer_665 = &i;
+const void* pointer_666 = &i;
+const void* pointer_667 = &i;
+const void* pointer_668 = &i;
+const void* pointer_669 = &i;
+const void* pointer_670 = &i;
+const void* pointer_671 = &i;
+const void* pointer_672 = &i;
+const void* pointer_673 = &i;
+const void* pointer_674 = &i;
+const void* pointer_675 = &i;
+const void* pointer_676 = &i;
+const void* pointer_677 = &i;
+const void* pointer_678 = &i;
+const void* pointer_679 = &i;
+const void* pointer_680 = &i;
+const void* pointer_681 = &i;
+const void* pointer_682 = &i;
+const void* pointer_683 = &i;
+const void* pointer_684 = &i;
+const void* pointer_685 = &i;
+const void* pointer_686 = &i;
+const void* pointer_687 = &i;
+const void* pointer_688 = &i;
+const void* pointer_689 = &i;
+const void* pointer_690 = &i;
+const void* pointer_691 = &i;
+const void* pointer_692 = &i;
+const void* pointer_693 = &i;
+const void* pointer_694 = &i;
+const void* pointer_695 = &i;
+const void* pointer_696 = &i;
+const void* pointer_697 = &i;
+const void* pointer_698 = &i;
+const void* pointer_699 = &i;
+const void* pointer_700 = &i;
+const void* pointer_701 = &i;
+const void* pointer_702 = &i;
+const void* pointer_703 = &i;
+const void* pointer_704 = &i;
+const void* pointer_705 = &i;
+const void* pointer_706 = &i;
+const void* pointer_707 = &i;
+const void* pointer_708 = &i;
+const void* pointer_709 = &i;
+const void* pointer_710 = &i;
+const void* pointer_711 = &i;
+const void* pointer_712 = &i;
+const void* pointer_713 = &i;
+const void* pointer_714 = &i;
+const void* pointer_715 = &i;
+const void* pointer_716 = &i;
+const void* pointer_717 = &i;
+const void* pointer_718 = &i;
+const void* pointer_719 = &i;
+const void* pointer_720 = &i;
+const void* pointer_721 = &i;
+const void* pointer_722 = &i;
+const void* pointer_723 = &i;
+const void* pointer_724 = &i;
+const void* pointer_725 = &i;
+const void* pointer_726 = &i;
+const void* pointer_727 = &i;
+const void* pointer_728 = &i;
+const void* pointer_729 = &i;
+const void* pointer_730 = &i;
+const void* pointer_731 = &i;
+const void* pointer_732 = &i;
+const void* pointer_733 = &i;
+const void* pointer_734 = &i;
+const void* pointer_735 = &i;
+const void* pointer_736 = &i;
+const void* pointer_737 = &i;
+const void* pointer_738 = &i;
+const void* pointer_739 = &i;
+const void* pointer_740 = &i;
+const void* pointer_741 = &i;
+const void* pointer_742 = &i;
+const void* pointer_743 = &i;
+const void* pointer_744 = &i;
+const void* pointer_745 = &i;
+const void* pointer_746 = &i;
+const void* pointer_747 = &i;
+const void* pointer_748 = &i;
+const void* pointer_749 = &i;
+const void* pointer_750 = &i;
+const void* pointer_751 = &i;
+const void* pointer_752 = &i;
+const void* pointer_753 = &i;
+const void* pointer_754 = &i;
+const void* pointer_755 = &i;
+const void* pointer_756 = &i;
+const void* pointer_757 = &i;
+const void* pointer_758 = &i;
+const void* pointer_759 = &i;
+const void* pointer_760 = &i;
+const void* pointer_761 = &i;
+const void* pointer_762 = &i;
+const void* pointer_763 = &i;
+const void* pointer_764 = &i;
+const void* pointer_765 = &i;
+const void* pointer_766 = &i;
+const void* pointer_767 = &i;
+const void* pointer_768 = &i;
+const void* pointer_769 = &i;
+const void* pointer_770 = &i;
+const void* pointer_771 = &i;
+const void* pointer_772 = &i;
+const void* pointer_773 = &i;
+const void* pointer_774 = &i;
+const void* pointer_775 = &i;
+const void* pointer_776 = &i;
+const void* pointer_777 = &i;
+const void* pointer_778 = &i;
+const void* pointer_779 = &i;
+const void* pointer_780 = &i;
+const void* pointer_781 = &i;
+const void* pointer_782 = &i;
+const void* pointer_783 = &i;
+const void* pointer_784 = &i;
+const void* pointer_785 = &i;
+const void* pointer_786 = &i;
+const void* pointer_787 = &i;
+const void* pointer_788 = &i;
+const void* pointer_789 = &i;
+const void* pointer_790 = &i;
+const void* pointer_791 = &i;
+const void* pointer_792 = &i;
+const void* pointer_793 = &i;
+const void* pointer_794 = &i;
+const void* pointer_795 = &i;
+const void* pointer_796 = &i;
+const void* pointer_797 = &i;
+const void* pointer_798 = &i;
+const void* pointer_799 = &i;
+const void* pointer_800 = &i;
+const void* pointer_801 = &i;
+const void* pointer_802 = &i;
+const void* pointer_803 = &i;
+const void* pointer_804 = &i;
+const void* pointer_805 = &i;
+const void* pointer_806 = &i;
+const void* pointer_807 = &i;
+const void* pointer_808 = &i;
+const void* pointer_809 = &i;
+const void* pointer_810 = &i;
+const void* pointer_811 = &i;
+const void* pointer_812 = &i;
+const void* pointer_813 = &i;
+const void* pointer_814 = &i;
+const void* pointer_815 = &i;
+const void* pointer_816 = &i;
+const void* pointer_817 = &i;
+const void* pointer_818 = &i;
+const void* pointer_819 = &i;
+const void* pointer_820 = &i;
+const void* pointer_821 = &i;
+const void* pointer_822 = &i;
+const void* pointer_823 = &i;
+const void* pointer_824 = &i;
+const void* pointer_825 = &i;
+const void* pointer_826 = &i;
+const void* pointer_827 = &i;
+const void* pointer_828 = &i;
+const void* pointer_829 = &i;
+const void* pointer_830 = &i;
+const void* pointer_831 = &i;
+const void* pointer_832 = &i;
+const void* pointer_833 = &i;
+const void* pointer_834 = &i;
+const void* pointer_835 = &i;
+const void* pointer_836 = &i;
+const void* pointer_837 = &i;
+const void* pointer_838 = &i;
+const void* pointer_839 = &i;
+const void* pointer_840 = &i;
+const void* pointer_841 = &i;
+const void* pointer_842 = &i;
+const void* pointer_843 = &i;
+const void* pointer_844 = &i;
+const void* pointer_845 = &i;
+const void* pointer_846 = &i;
+const void* pointer_847 = &i;
+const void* pointer_848 = &i;
+const void* pointer_849 = &i;
+const void* pointer_850 = &i;
+const void* pointer_851 = &i;
+const void* pointer_852 = &i;
+const void* pointer_853 = &i;
+const void* pointer_854 = &i;
+const void* pointer_855 = &i;
+const void* pointer_856 = &i;
+const void* pointer_857 = &i;
+const void* pointer_858 = &i;
+const void* pointer_859 = &i;
+const void* pointer_860 = &i;
+const void* pointer_861 = &i;
+const void* pointer_862 = &i;
+const void* pointer_863 = &i;
+const void* pointer_864 = &i;
+const void* pointer_865 = &i;
+const void* pointer_866 = &i;
+const void* pointer_867 = &i;
+const void* pointer_868 = &i;
+const void* pointer_869 = &i;
+const void* pointer_870 = &i;
+const void* pointer_871 = &i;
+const void* pointer_872 = &i;
+const void* pointer_873 = &i;
+const void* pointer_874 = &i;
+const void* pointer_875 = &i;
+const void* pointer_876 = &i;
+const void* pointer_877 = &i;
+const void* pointer_878 = &i;
+const void* pointer_879 = &i;
+const void* pointer_880 = &i;
+const void* pointer_881 = &i;
+const void* pointer_882 = &i;
+const void* pointer_883 = &i;
+const void* pointer_884 = &i;
+const void* pointer_885 = &i;
+const void* pointer_886 = &i;
+const void* pointer_887 = &i;
+const void* pointer_888 = &i;
+const void* pointer_889 = &i;
+const void* pointer_890 = &i;
+const void* pointer_891 = &i;
+const void* pointer_892 = &i;
+const void* pointer_893 = &i;
+const void* pointer_894 = &i;
+const void* pointer_895 = &i;
+const void* pointer_896 = &i;
+const void* pointer_897 = &i;
+const void* pointer_898 = &i;
+const void* pointer_899 = &i;
+const void* pointer_900 = &i;
+const void* pointer_901 = &i;
+const void* pointer_902 = &i;
+const void* pointer_903 = &i;
+const void* pointer_904 = &i;
+const void* pointer_905 = &i;
+const void* pointer_906 = &i;
+const void* pointer_907 = &i;
+const void* pointer_908 = &i;
+const void* pointer_909 = &i;
+const void* pointer_910 = &i;
+const void* pointer_911 = &i;
+const void* pointer_912 = &i;
+const void* pointer_913 = &i;
+const void* pointer_914 = &i;
+const void* pointer_915 = &i;
+const void* pointer_916 = &i;
+const void* pointer_917 = &i;
+const void* pointer_918 = &i;
+const void* pointer_919 = &i;
+const void* pointer_920 = &i;
+const void* pointer_921 = &i;
+const void* pointer_922 = &i;
+const void* pointer_923 = &i;
+const void* pointer_924 = &i;
+const void* pointer_925 = &i;
+const void* pointer_926 = &i;
+const void* pointer_927 = &i;
+const void* pointer_928 = &i;
+const void* pointer_929 = &i;
+const void* pointer_930 = &i;
+const void* pointer_931 = &i;
+const void* pointer_932 = &i;
+const void* pointer_933 = &i;
+const void* pointer_934 = &i;
+const void* pointer_935 = &i;
+const void* pointer_936 = &i;
+const void* pointer_937 = &i;
+const void* pointer_938 = &i;
+const void* pointer_939 = &i;
+const void* pointer_940 = &i;
+const void* pointer_941 = &i;
+const void* pointer_942 = &i;
+const void* pointer_943 = &i;
+const void* pointer_944 = &i;
+const void* pointer_945 = &i;
+const void* pointer_946 = &i;
+const void* pointer_947 = &i;
+const void* pointer_948 = &i;
+const void* pointer_949 = &i;
+const void* pointer_950 = &i;
+const void* pointer_951 = &i;
+const void* pointer_952 = &i;
+const void* pointer_953 = &i;
+const void* pointer_954 = &i;
+const void* pointer_955 = &i;
+const void* pointer_956 = &i;
+const void* pointer_957 = &i;
+const void* pointer_958 = &i;
+const void* pointer_959 = &i;
+const void* pointer_960 = &i;
+const void* pointer_961 = &i;
+const void* pointer_962 = &i;
+const void* pointer_963 = &i;
+const void* pointer_964 = &i;
+const void* pointer_965 = &i;
+const void* pointer_966 = &i;
+const void* pointer_967 = &i;
+const void* pointer_968 = &i;
+const void* pointer_969 = &i;
+const void* pointer_970 = &i;
+const void* pointer_971 = &i;
+const void* pointer_972 = &i;
+const void* pointer_973 = &i;
+const void* pointer_974 = &i;
+const void* pointer_975 = &i;
+const void* pointer_976 = &i;
+const void* pointer_977 = &i;
+const void* pointer_978 = &i;
+const void* pointer_979 = &i;
+const void* pointer_980 = &i;
+const void* pointer_981 = &i;
+const void* pointer_982 = &i;
+const void* pointer_983 = &i;
+const void* pointer_984 = &i;
+const void* pointer_985 = &i;
+const void* pointer_986 = &i;
+const void* pointer_987 = &i;
+const void* pointer_988 = &i;
+const void* pointer_989 = &i;
+const void* pointer_990 = &i;
+const void* pointer_991 = &i;
+const void* pointer_992 = &i;
+const void* pointer_993 = &i;
+const void* pointer_994 = &i;
+const void* pointer_995 = &i;
+const void* pointer_996 = &i;
+const void* pointer_997 = &i;
+const void* pointer_998 = &i;
+const void* pointer_999 = &i;
diff --git a/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so
new file mode 100755
index 0000000..6ce6d0c
--- /dev/null
+++ b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32.so
Binary files differ
diff --git a/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so
new file mode 100755
index 0000000..d97ef82
--- /dev/null
+++ b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm32_packed.so
Binary files differ
diff --git a/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so
new file mode 100755
index 0000000..945b450
--- /dev/null
+++ b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64.so
Binary files differ
diff --git a/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so
new file mode 100755
index 0000000..e44e459
--- /dev/null
+++ b/tools/relocation_packer/test_data/elf_file_unittest_relocs_arm64_packed.so
Binary files differ
diff --git a/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.py b/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.py
new file mode 100755
index 0000000..e71b5cb
--- /dev/null
+++ b/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Build relocation packer unit test data.
+
+Uses a built relocation packer to generate 'golden' reference test data
+files for elf_file_unittests.cc.
+"""
+
+import optparse
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+
+def PackArmLibraryRelocations(android_pack_relocations,
+ android_objcopy,
+ added_section,
+ input_path,
+ output_path):
+ # Copy and add a 'NULL' .android.rel.dyn section for the packing tool.
+ with tempfile.NamedTemporaryFile() as stream:
+ stream.write('NULL')
+ stream.flush()
+ objcopy_command = [android_objcopy,
+ '--add-section', '%s=%s' % (added_section, stream.name),
+ input_path, output_path]
+ subprocess.check_call(objcopy_command)
+
+ # Pack relocations.
+ pack_command = [android_pack_relocations, output_path]
+ subprocess.check_call(pack_command)
+
+
+def UnpackArmLibraryRelocations(android_pack_relocations,
+ input_path,
+ output_path):
+ shutil.copy(input_path, output_path)
+
+ # Unpack relocations. We leave the .android.rel.dyn or .android.rela.dyn
+ # in place.
+ unpack_command = [android_pack_relocations, '-u', output_path]
+ subprocess.check_call(unpack_command)
+
+
+def main():
+ parser = optparse.OptionParser()
+
+ parser.add_option('--android-pack-relocations',
+ help='Path to the ARM relocations packer binary')
+ parser.add_option('--android-objcopy',
+ help='Path to the toolchain\'s objcopy binary')
+ parser.add_option('--added-section',
+ choices=['.android.rel.dyn', '.android.rela.dyn'],
+ help='Section to add, one of ".android.rel.dyn" or ".android.rela.dyn"')
+ parser.add_option('--test-file',
+ help='Path to the input test file, an unpacked ARM .so')
+ parser.add_option('--unpacked-output',
+ help='Path to the output file for reference unpacked data')
+ parser.add_option('--packed-output',
+ help='Path to the output file for reference packed data')
+
+ options, _ = parser.parse_args()
+
+ for output in [options.unpacked_output, options.packed_output]:
+ directory = os.path.dirname(output)
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+ PackArmLibraryRelocations(options.android_pack_relocations,
+ options.android_objcopy,
+ options.added_section,
+ options.test_file,
+ options.packed_output)
+
+ UnpackArmLibraryRelocations(options.android_pack_relocations,
+ options.packed_output,
+ options.unpacked_output)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.sh b/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.sh
new file mode 100755
index 0000000..f90a2f6
--- /dev/null
+++ b/tools/relocation_packer/test_data/generate_elf_file_unittest_relocs.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Generates elf_file_unittest_relocs_arm{32,64}{,_packed}.so test data files
+# from elf_file_unittest_relocs.cc. Run once to create these test data
+# files; the files are checked into the source tree.
+#
+# To use:
+# ./generate_elf_file_unittest_relocs.sh
+# git add elf_file_unittest_relocs_arm{32,64}{,_packed}.so
+
+function main() {
+ local '-r' test_data_directory="$(pwd)"
+ cd '../../..'
+
+ source tools/cr/cr-bash-helpers.sh
+ local arch
+ for arch in 'arm32' 'arm64'; do
+ cr 'init' '--platform=android' '--type=Debug' '--architecture='"${arch}"
+ cr 'build' 'relocation_packer_unittests_test_data'
+ done
+
+ local '-r' packer='out_android/Debug/obj/tools/relocation_packer'
+ local '-r' gen="${packer}/relocation_packer_unittests_test_data.gen"
+
+ cp "${gen}/elf_file_unittest_relocs_arm"{32,64}{,_packed}'.so' \
+ "${test_data_directory}"
+
+ return 0
+}
+
+main