sjkim1127's picture
Add compiled C++ corpus (snappy, double-conversion, ninja x O0/O2/O2-noinline)
3148e13 verified
Raw History Blame Contribute Delete
131 kB
# 0 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
# 1 "/tmp/tmpl_i20ey9/double-conversion/build//"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
# 28 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
# 1 "/usr/include/c++/13/climits" 1 3
# 39 "/usr/include/c++/13/climits" 3
# 40 "/usr/include/c++/13/climits" 3
# 1 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 1 3
# 306 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
# 306 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
namespace std
{
typedef long unsigned int size_t;
typedef long int ptrdiff_t;
typedef decltype(nullptr) nullptr_t;
#pragma GCC visibility push(default)
extern "C++" __attribute__ ((__noreturn__, __always_inline__))
inline void __terminate() noexcept
{
void terminate() noexcept __attribute__ ((__noreturn__));
terminate();
}
#pragma GCC visibility pop
}
# 339 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
namespace std
{
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}
namespace __gnu_cxx
{
inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
}
# 532 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
namespace std
{
#pragma GCC visibility push(default)
constexpr inline bool
__is_constant_evaluated() noexcept
{
return __builtin_is_constant_evaluated();
}
#pragma GCC visibility pop
}
# 679 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
# 1 "/usr/include/aarch64-linux-gnu/c++/13/bits/os_defines.h" 1 3
# 39 "/usr/include/aarch64-linux-gnu/c++/13/bits/os_defines.h" 3
# 1 "/usr/include/features.h" 1 3 4
# 394 "/usr/include/features.h" 3 4
# 1 "/usr/include/features-time64.h" 1 3 4
# 20 "/usr/include/features-time64.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 21 "/usr/include/features-time64.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/timesize.h" 1 3 4
# 22 "/usr/include/features-time64.h" 2 3 4
# 395 "/usr/include/features.h" 2 3 4
# 502 "/usr/include/features.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/sys/cdefs.h" 1 3 4
# 576 "/usr/include/aarch64-linux-gnu/sys/cdefs.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 577 "/usr/include/aarch64-linux-gnu/sys/cdefs.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/long-double.h" 1 3 4
# 578 "/usr/include/aarch64-linux-gnu/sys/cdefs.h" 2 3 4
# 503 "/usr/include/features.h" 2 3 4
# 526 "/usr/include/features.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/gnu/stubs.h" 1 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 6 "/usr/include/aarch64-linux-gnu/gnu/stubs.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h" 1 3 4
# 9 "/usr/include/aarch64-linux-gnu/gnu/stubs.h" 2 3 4
# 527 "/usr/include/features.h" 2 3 4
# 40 "/usr/include/aarch64-linux-gnu/c++/13/bits/os_defines.h" 2 3
# 680 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 2 3
# 1 "/usr/include/aarch64-linux-gnu/c++/13/bits/cpu_defines.h" 1 3
# 683 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 2 3
# 882 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 3
# 1 "/usr/include/c++/13/pstl/pstl_config.h" 1 3
# 883 "/usr/include/aarch64-linux-gnu/c++/13/bits/c++config.h" 2 3
# 42 "/usr/include/c++/13/climits" 2 3
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 1 3 4
# 34 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 3 4
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/syslimits.h" 1 3 4
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 1 3 4
# 205 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 26 "/usr/include/limits.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/libc-header-start.h" 1 3 4
# 27 "/usr/include/limits.h" 2 3 4
# 195 "/usr/include/limits.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/posix1_lim.h" 1 3 4
# 27 "/usr/include/aarch64-linux-gnu/bits/posix1_lim.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 28 "/usr/include/aarch64-linux-gnu/bits/posix1_lim.h" 2 3 4
# 161 "/usr/include/aarch64-linux-gnu/bits/posix1_lim.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/local_lim.h" 1 3 4
# 38 "/usr/include/aarch64-linux-gnu/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 39 "/usr/include/aarch64-linux-gnu/bits/local_lim.h" 2 3 4
# 81 "/usr/include/aarch64-linux-gnu/bits/local_lim.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h" 1 3 4
# 23 "/usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h" 3 4
extern "C" {
extern long int __sysconf (int __name) noexcept (true);
}
# 82 "/usr/include/aarch64-linux-gnu/bits/local_lim.h" 2 3 4
# 162 "/usr/include/aarch64-linux-gnu/bits/posix1_lim.h" 2 3 4
# 196 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/posix2_lim.h" 1 3 4
# 200 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/xopen_lim.h" 1 3 4
# 64 "/usr/include/aarch64-linux-gnu/bits/xopen_lim.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/uio_lim.h" 1 3 4
# 65 "/usr/include/aarch64-linux-gnu/bits/xopen_lim.h" 2 3 4
# 204 "/usr/include/limits.h" 2 3 4
# 206 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/aarch64-linux-gnu/13/include/syslimits.h" 2 3 4
# 35 "/usr/lib/gcc/aarch64-linux-gnu/13/include/limits.h" 2 3 4
# 43 "/usr/include/c++/13/climits" 2 3
# 29 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
# 1 "/usr/include/c++/13/cstdarg" 1 3
# 39 "/usr/include/c++/13/cstdarg" 3
# 40 "/usr/include/c++/13/cstdarg" 3
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdarg.h" 1 3 4
# 40 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 103 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 44 "/usr/include/c++/13/cstdarg" 2 3
# 53 "/usr/include/c++/13/cstdarg" 3
namespace std
{
using ::va_list;
}
# 30 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/bignum.h" 1
# 31 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/bignum.h"
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 1
# 34 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
# 1 "/usr/include/c++/13/cstdlib" 1 3
# 39 "/usr/include/c++/13/cstdlib" 3
# 40 "/usr/include/c++/13/cstdlib" 3
# 79 "/usr/include/c++/13/cstdlib" 3
# 1 "/usr/include/stdlib.h" 1 3 4
# 26 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/libc-header-start.h" 1 3 4
# 27 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 1 3 4
# 214 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 33 "/usr/include/stdlib.h" 2 3 4
extern "C" {
# 1 "/usr/include/aarch64-linux-gnu/bits/waitflags.h" 1 3 4
# 41 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/waitstatus.h" 1 3 4
# 42 "/usr/include/stdlib.h" 2 3 4
# 56 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/floatn.h" 1 3 4
# 23 "/usr/include/aarch64-linux-gnu/bits/floatn.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/long-double.h" 1 3 4
# 24 "/usr/include/aarch64-linux-gnu/bits/floatn.h" 2 3 4
# 95 "/usr/include/aarch64-linux-gnu/bits/floatn.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/floatn-common.h" 1 3 4
# 24 "/usr/include/aarch64-linux-gnu/bits/floatn-common.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/long-double.h" 1 3 4
# 25 "/usr/include/aarch64-linux-gnu/bits/floatn-common.h" 2 3 4
# 96 "/usr/include/aarch64-linux-gnu/bits/floatn.h" 2 3 4
# 57 "/usr/include/stdlib.h" 2 3 4
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 98 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) noexcept (true) ;
extern double atof (const char *__nptr)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (const char *__nptr)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (const char *__nptr)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (const char *__nptr)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern float strtof (const char *__restrict __nptr,
char **__restrict __endptr) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern long double strtold (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
# 141 "/usr/include/stdlib.h" 3 4
extern _Float32 strtof32 (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern _Float64 strtof64 (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern _Float128 strtof128 (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern _Float32x strtof32x (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern _Float64x strtof64x (const char *__restrict __nptr,
char **__restrict __endptr)
noexcept (true) __attribute__ ((__nonnull__ (1)));
# 177 "/usr/include/stdlib.h" 3 4
extern long int strtol (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern unsigned long int strtoul (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoq (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtouq (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoll (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtoull (const char *__restrict __nptr,
char **__restrict __endptr, int __base)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtol")
__attribute__ ((__nonnull__ (1)));
extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoul")
__attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoll")
__attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoull")
__attribute__ ((__nonnull__ (1)));
__extension__
extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoll")
__attribute__ ((__nonnull__ (1)));
__extension__
extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) noexcept (true) __asm__ ("" "__isoc23_strtoull")
__attribute__ ((__nonnull__ (1)));
# 278 "/usr/include/stdlib.h" 3 4
extern int strfromd (char *__dest, size_t __size, const char *__format,
double __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfromf (char *__dest, size_t __size, const char *__format,
float __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfroml (char *__dest, size_t __size, const char *__format,
long double __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
# 298 "/usr/include/stdlib.h" 3 4
extern int strfromf32 (char *__dest, size_t __size, const char * __format,
_Float32 __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfromf64 (char *__dest, size_t __size, const char * __format,
_Float64 __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfromf128 (char *__dest, size_t __size, const char * __format,
_Float128 __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfromf32x (char *__dest, size_t __size, const char * __format,
_Float32x __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
extern int strfromf64x (char *__dest, size_t __size, const char * __format,
_Float64x __f)
noexcept (true) __attribute__ ((__nonnull__ (3)));
# 338 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/locale_t.h" 1 3 4
# 22 "/usr/include/aarch64-linux-gnu/bits/types/locale_t.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/__locale_t.h" 1 3 4
# 27 "/usr/include/aarch64-linux-gnu/bits/types/__locale_t.h" 3 4
struct __locale_struct
{
struct __locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
const char *__names[13];
};
typedef struct __locale_struct *__locale_t;
# 23 "/usr/include/aarch64-linux-gnu/bits/types/locale_t.h" 2 3 4
typedef __locale_t locale_t;
# 339 "/usr/include/stdlib.h" 2 3 4
extern long int strtol_l (const char *__restrict __nptr,
char **__restrict __endptr, int __base,
locale_t __loc) noexcept (true) __attribute__ ((__nonnull__ (1, 4)));
extern unsigned long int strtoul_l (const char *__restrict __nptr,
char **__restrict __endptr,
int __base, locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 4)));
__extension__
extern long long int strtoll_l (const char *__restrict __nptr,
char **__restrict __endptr, int __base,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 4)));
__extension__
extern unsigned long long int strtoull_l (const char *__restrict __nptr,
char **__restrict __endptr,
int __base, locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 4)));
extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) noexcept (true) __asm__ ("" "__isoc23_strtol_l")
__attribute__ ((__nonnull__ (1, 4)));
extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) noexcept (true) __asm__ ("" "__isoc23_strtoul_l")
__attribute__ ((__nonnull__ (1, 4)));
__extension__
extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) noexcept (true) __asm__ ("" "__isoc23_strtoll_l")
__attribute__ ((__nonnull__ (1, 4)));
__extension__
extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, locale_t __loc) noexcept (true) __asm__ ("" "__isoc23_strtoull_l")
__attribute__ ((__nonnull__ (1, 4)));
# 415 "/usr/include/stdlib.h" 3 4
extern double strtod_l (const char *__restrict __nptr,
char **__restrict __endptr, locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern float strtof_l (const char *__restrict __nptr,
char **__restrict __endptr, locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern long double strtold_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
# 436 "/usr/include/stdlib.h" 3 4
extern _Float32 strtof32_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern _Float64 strtof64_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern _Float128 strtof128_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern _Float32x strtof32x_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
extern _Float64x strtof64x_l (const char *__restrict __nptr,
char **__restrict __endptr,
locale_t __loc)
noexcept (true) __attribute__ ((__nonnull__ (1, 3)));
# 505 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) noexcept (true) ;
extern long int a64l (const char *__s)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 1 "/usr/include/aarch64-linux-gnu/sys/types.h" 1 3 4
# 27 "/usr/include/aarch64-linux-gnu/sys/types.h" 3 4
extern "C" {
# 1 "/usr/include/aarch64-linux-gnu/bits/types.h" 1 3 4
# 27 "/usr/include/aarch64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 28 "/usr/include/aarch64-linux-gnu/bits/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/timesize.h" 1 3 4
# 29 "/usr/include/aarch64-linux-gnu/bits/types.h" 2 3 4
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef __int8_t __int_least8_t;
typedef __uint8_t __uint_least8_t;
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
typedef __int64_t __int_least64_t;
typedef __uint64_t __uint_least64_t;
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
typedef long int __intmax_t;
typedef unsigned long int __uintmax_t;
# 141 "/usr/include/aarch64-linux-gnu/bits/types.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/typesizes.h" 1 3 4
# 142 "/usr/include/aarch64-linux-gnu/bits/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/time64.h" 1 3 4
# 143 "/usr/include/aarch64-linux-gnu/bits/types.h" 2 3 4
typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef long int __suseconds64_t;
typedef int __daddr_t;
typedef int __key_t;
typedef int __clockid_t;
typedef void * __timer_t;
typedef int __blksize_t;
typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;
typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;
typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;
typedef long int __fsword_t;
typedef long int __ssize_t;
typedef long int __syscall_slong_t;
typedef unsigned long int __syscall_ulong_t;
typedef __off64_t __loff_t;
typedef char *__caddr_t;
typedef long int __intptr_t;
typedef unsigned int __socklen_t;
typedef int __sig_atomic_t;
# 30 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 1 "/usr/include/aarch64-linux-gnu/bits/types/clock_t.h" 1 3 4
typedef __clock_t clock_t;
# 127 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/clockid_t.h" 1 3 4
typedef __clockid_t clockid_t;
# 129 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/time_t.h" 1 3 4
# 10 "/usr/include/aarch64-linux-gnu/bits/types/time_t.h" 3 4
typedef __time_t time_t;
# 130 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/timer_t.h" 1 3 4
typedef __timer_t timer_t;
# 131 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 1 3 4
# 145 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 1 "/usr/include/aarch64-linux-gnu/bits/stdint-intn.h" 1 3 4
# 24 "/usr/include/aarch64-linux-gnu/bits/stdint-intn.h" 3 4
typedef __int8_t int8_t;
typedef __int16_t int16_t;
typedef __int32_t int32_t;
typedef __int64_t int64_t;
# 156 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
typedef __uint8_t u_int8_t;
typedef __uint16_t u_int16_t;
typedef __uint32_t u_int32_t;
typedef __uint64_t u_int64_t;
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 176 "/usr/include/aarch64-linux-gnu/sys/types.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 24 "/usr/include/endian.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/endian.h" 1 3 4
# 35 "/usr/include/aarch64-linux-gnu/bits/endian.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/endianness.h" 1 3 4
# 36 "/usr/include/aarch64-linux-gnu/bits/endian.h" 2 3 4
# 25 "/usr/include/endian.h" 2 3 4
# 35 "/usr/include/endian.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/byteswap.h" 1 3 4
# 33 "/usr/include/aarch64-linux-gnu/bits/byteswap.h" 3 4
static __inline __uint16_t
__bswap_16 (__uint16_t __bsx)
{
return __builtin_bswap16 (__bsx);
}
static __inline __uint32_t
__bswap_32 (__uint32_t __bsx)
{
return __builtin_bswap32 (__bsx);
}
# 69 "/usr/include/aarch64-linux-gnu/bits/byteswap.h" 3 4
__extension__ static __inline __uint64_t
__bswap_64 (__uint64_t __bsx)
{
return __builtin_bswap64 (__bsx);
}
# 36 "/usr/include/endian.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/uintn-identity.h" 1 3 4
# 32 "/usr/include/aarch64-linux-gnu/bits/uintn-identity.h" 3 4
static __inline __uint16_t
__uint16_identity (__uint16_t __x)
{
return __x;
}
static __inline __uint32_t
__uint32_identity (__uint32_t __x)
{
return __x;
}
static __inline __uint64_t
__uint64_identity (__uint64_t __x)
{
return __x;
}
# 37 "/usr/include/endian.h" 2 3 4
# 177 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/sys/select.h" 1 3 4
# 30 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/select.h" 1 3 4
# 31 "/usr/include/aarch64-linux-gnu/sys/select.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/sigset_t.h" 1 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h" 1 3 4
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 5 "/usr/include/aarch64-linux-gnu/bits/types/sigset_t.h" 2 3 4
typedef __sigset_t sigset_t;
# 34 "/usr/include/aarch64-linux-gnu/sys/select.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h" 1 3 4
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 38 "/usr/include/aarch64-linux-gnu/sys/select.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h" 1 3 4
# 11 "/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h" 3 4
struct timespec
{
__time_t tv_sec;
__syscall_slong_t tv_nsec;
# 31 "/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h" 3 4
};
# 40 "/usr/include/aarch64-linux-gnu/sys/select.h" 2 3 4
# 49 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
typedef long int __fd_mask;
# 59 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
typedef struct
{
__fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 91 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
extern "C" {
# 102 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
# 127 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
# 153 "/usr/include/aarch64-linux-gnu/sys/select.h" 3 4
}
# 180 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 219 "/usr/include/aarch64-linux-gnu/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
# 1 "/usr/include/aarch64-linux-gnu/bits/pthreadtypes.h" 1 3 4
# 23 "/usr/include/aarch64-linux-gnu/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 1 3 4
# 44 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h" 1 3 4
# 45 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h" 1 3 4
# 25 "/usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h" 3 4
typedef union
{
__extension__ unsigned long long int __value64;
struct
{
unsigned int __low;
unsigned int __high;
} __value32;
} __atomic_wide_counter;
# 47 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 2 3 4
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
typedef struct __pthread_internal_slist
{
struct __pthread_internal_slist *__next;
} __pthread_slist_t;
# 76 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/struct_mutex.h" 1 3 4
# 27 "/usr/include/aarch64-linux-gnu/bits/struct_mutex.h" 3 4
struct __pthread_mutex_s
{
int __lock ;
unsigned int __count;
int __owner;
unsigned int __nusers;
# 58 "/usr/include/aarch64-linux-gnu/bits/struct_mutex.h" 3 4
int __kind;
int __spins;
__pthread_list_t __list;
# 74 "/usr/include/aarch64-linux-gnu/bits/struct_mutex.h" 3 4
};
# 77 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 2 3 4
# 89 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/struct_rwlock.h" 1 3 4
# 23 "/usr/include/aarch64-linux-gnu/bits/struct_rwlock.h" 3 4
struct __pthread_rwlock_arch_t
{
unsigned int __readers;
unsigned int __writers;
unsigned int __wrphase_futex;
unsigned int __writers_futex;
unsigned int __pad3;
unsigned int __pad4;
int __cur_writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
};
# 90 "/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h" 2 3 4
struct __pthread_cond_s
{
__atomic_wide_counter __wseq;
__atomic_wide_counter __g1_start;
unsigned int __g_refs[2] ;
unsigned int __g_size[2];
unsigned int __g1_orig_size;
unsigned int __wrefs;
unsigned int __g_signals[2];
};
typedef unsigned int __tss_t;
typedef unsigned long int __thrd_t;
typedef struct
{
int __data ;
} __once_flag;
# 24 "/usr/include/aarch64-linux-gnu/bits/pthreadtypes.h" 2 3 4
typedef unsigned long int pthread_t;
typedef union
{
char __size[8];
int __align;
} pthread_mutexattr_t;
typedef union
{
char __size[8];
int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
union pthread_attr_t
{
char __size[64];
long int __align;
};
typedef union pthread_attr_t pthread_attr_t;
typedef union
{
struct __pthread_mutex_s __data;
char __size[48];
long int __align;
} pthread_mutex_t;
typedef union
{
struct __pthread_cond_s __data;
char __size[48];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
struct __pthread_rwlock_arch_t __data;
char __size[56];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[8];
long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
char __size[32];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[8];
int __align;
} pthread_barrierattr_t;
# 228 "/usr/include/aarch64-linux-gnu/sys/types.h" 2 3 4
}
# 515 "/usr/include/stdlib.h" 2 3 4
extern long int random (void) noexcept (true);
extern void srandom (unsigned int __seed) noexcept (true);
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) noexcept (true) __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) noexcept (true) __attribute__ ((__nonnull__ (1)));
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
noexcept (true) __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
noexcept (true) __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) noexcept (true);
extern void srand (unsigned int __seed) noexcept (true);
extern int rand_r (unsigned int *__seed) noexcept (true);
extern double drand48 (void) noexcept (true);
extern double erand48 (unsigned short int __xsubi[3]) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) noexcept (true);
extern long int nrand48 (unsigned short int __xsubi[3])
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) noexcept (true);
extern long int jrand48 (unsigned short int __xsubi[3])
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) noexcept (true);
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) noexcept (true) __attribute__ ((__nonnull__ (1)));
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
__extension__ unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
noexcept (true) __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern __uint32_t arc4random (void)
noexcept (true) ;
extern void arc4random_buf (void *__buf, size_t __size)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern __uint32_t arc4random_uniform (__uint32_t __upper_bound)
noexcept (true) ;
extern void *malloc (size_t __size) noexcept (true) __attribute__ ((__malloc__))
__attribute__ ((__alloc_size__ (1))) ;
extern void *calloc (size_t __nmemb, size_t __size)
noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) ;
extern void *realloc (void *__ptr, size_t __size)
noexcept (true) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
extern void free (void *__ptr) noexcept (true);
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
noexcept (true) __attribute__ ((__warn_unused_result__))
__attribute__ ((__alloc_size__ (2, 3)))
__attribute__ ((__malloc__ (__builtin_free, 1)));
extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
noexcept (true) __attribute__ ((__malloc__ (reallocarray, 1)));
# 1 "/usr/include/alloca.h" 1 3 4
# 24 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 1 3 4
# 25 "/usr/include/alloca.h" 2 3 4
extern "C" {
extern void *alloca (size_t __size) noexcept (true);
}
# 707 "/usr/include/stdlib.h" 2 3 4
extern void *valloc (size_t __size) noexcept (true) __attribute__ ((__malloc__))
__attribute__ ((__alloc_size__ (1))) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
noexcept (true) __attribute__ ((__nonnull__ (1))) ;
extern void *aligned_alloc (size_t __alignment, size_t __size)
noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__alloc_align__ (1)))
__attribute__ ((__alloc_size__ (2))) ;
extern void abort (void) noexcept (true) __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern "C++" int at_quick_exit (void (*__func) (void))
noexcept (true) __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1)));
# 749 "/usr/include/stdlib.h" 3 4
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
noexcept (true) __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) noexcept (true) __attribute__ ((__noreturn__));
extern void quick_exit (int __status) noexcept (true) __attribute__ ((__noreturn__));
extern void _Exit (int __status) noexcept (true) __attribute__ ((__noreturn__));
extern char *getenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1))) ;
extern char *secure_getenv (const char *__name)
noexcept (true) __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern int setenv (const char *__name, const char *__value, int __replace)
noexcept (true) __attribute__ ((__nonnull__ (2)));
extern int unsetenv (const char *__name) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) noexcept (true);
# 814 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1)));
# 827 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 837 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 849 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 859 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
__attribute__ ((__nonnull__ (1))) ;
# 870 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) noexcept (true) __attribute__ ((__nonnull__ (1))) ;
# 881 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 891 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 901 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 913 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 923 "/usr/include/stdlib.h" 3 4
extern int system (const char *__command) ;
extern char *canonicalize_file_name (const char *__name)
noexcept (true) __attribute__ ((__nonnull__ (1))) __attribute__ ((__malloc__))
__attribute__ ((__malloc__ (__builtin_free, 1))) ;
# 940 "/usr/include/stdlib.h" 3 4
extern char *realpath (const char *__restrict __name,
char *__restrict __resolved) noexcept (true) ;
typedef int (*__compar_fn_t) (const void *, const void *);
typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
extern void *bsearch (const void *__key, const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
__attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) noexcept (true) __attribute__ ((__const__)) ;
extern long int labs (long int __x) noexcept (true) __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
noexcept (true) __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
noexcept (true) __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
noexcept (true) __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
noexcept (true) __attribute__ ((__const__)) ;
# 1012 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
noexcept (true) __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
noexcept (true) __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
noexcept (true) __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
noexcept (true) __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (const char *__s, size_t __n) noexcept (true);
extern int mbtowc (wchar_t *__restrict __pwc,
const char *__restrict __s, size_t __n) noexcept (true);
extern int wctomb (char *__s, wchar_t __wchar) noexcept (true);
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
const char *__restrict __s, size_t __n) noexcept (true)
__attribute__ ((__access__ (__read_only__, 2)));
extern size_t wcstombs (char *__restrict __s,
const wchar_t *__restrict __pwcs, size_t __n)
noexcept (true)
__attribute__ ((__access__ (__write_only__, 1, 3)))
__attribute__ ((__access__ (__read_only__, 2)));
extern int rpmatch (const char *__response) noexcept (true) __attribute__ ((__nonnull__ (1))) ;
# 1099 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
char *const *__restrict __tokens,
char **__restrict __valuep)
noexcept (true) __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern int posix_openpt (int __oflag) ;
extern int grantpt (int __fd) noexcept (true);
extern int unlockpt (int __fd) noexcept (true);
extern char *ptsname (int __fd) noexcept (true) ;
extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
extern int getpt (void);
extern int getloadavg (double __loadavg[], int __nelem)
noexcept (true) __attribute__ ((__nonnull__ (1)));
# 1155 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/stdlib-float.h" 1 3 4
# 1156 "/usr/include/stdlib.h" 2 3 4
# 1167 "/usr/include/stdlib.h" 3 4
}
# 80 "/usr/include/c++/13/cstdlib" 2 3
# 1 "/usr/include/c++/13/bits/std_abs.h" 1 3
# 33 "/usr/include/c++/13/bits/std_abs.h" 3
# 34 "/usr/include/c++/13/bits/std_abs.h" 3
# 46 "/usr/include/c++/13/bits/std_abs.h" 3
extern "C++"
{
namespace std __attribute__ ((__visibility__ ("default")))
{
using ::abs;
inline long
abs(long __i) { return __builtin_labs(__i); }
inline long long
abs(long long __x) { return __builtin_llabs (__x); }
# 70 "/usr/include/c++/13/bits/std_abs.h" 3
inline constexpr double
abs(double __x)
{ return __builtin_fabs(__x); }
inline constexpr float
abs(float __x)
{ return __builtin_fabsf(__x); }
inline constexpr long double
abs(long double __x)
{ return __builtin_fabsl(__x); }
__extension__ inline constexpr __int128
abs(__int128 __x) { return __x >= 0 ? __x : -__x; }
# 150 "/usr/include/c++/13/bits/std_abs.h" 3
}
}
# 82 "/usr/include/c++/13/cstdlib" 2 3
# 125 "/usr/include/c++/13/cstdlib" 3
extern "C++"
{
namespace std __attribute__ ((__visibility__ ("default")))
{
using ::div_t;
using ::ldiv_t;
using ::abort;
using ::aligned_alloc;
using ::atexit;
using ::at_quick_exit;
using ::atof;
using ::atoi;
using ::atol;
using ::bsearch;
using ::calloc;
using ::div;
using ::exit;
using ::free;
using ::getenv;
using ::labs;
using ::ldiv;
using ::malloc;
using ::mblen;
using ::mbstowcs;
using ::mbtowc;
using ::qsort;
using ::quick_exit;
using ::rand;
using ::realloc;
using ::srand;
using ::strtod;
using ::strtol;
using ::strtoul;
using ::system;
using ::wcstombs;
using ::wctomb;
inline ldiv_t
div(long __i, long __j) noexcept { return ldiv(__i, __j); }
}
# 199 "/usr/include/c++/13/cstdlib" 3
namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
using ::lldiv_t;
using ::_Exit;
using ::llabs;
inline lldiv_t
div(long long __n, long long __d)
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::lldiv;
# 231 "/usr/include/c++/13/cstdlib" 3
using ::atoll;
using ::strtoll;
using ::strtoull;
using ::strtof;
using ::strtold;
}
namespace std
{
using ::__gnu_cxx::lldiv_t;
using ::__gnu_cxx::_Exit;
using ::__gnu_cxx::llabs;
using ::__gnu_cxx::div;
using ::__gnu_cxx::lldiv;
using ::__gnu_cxx::atoll;
using ::__gnu_cxx::strtof;
using ::__gnu_cxx::strtoll;
using ::__gnu_cxx::strtoull;
using ::__gnu_cxx::strtold;
}
}
# 35 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 2
# 1 "/usr/include/c++/13/cstring" 1 3
# 39 "/usr/include/c++/13/cstring" 3
# 40 "/usr/include/c++/13/cstring" 3
# 1 "/usr/include/string.h" 1 3 4
# 26 "/usr/include/string.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/libc-header-start.h" 1 3 4
# 27 "/usr/include/string.h" 2 3 4
extern "C" {
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 1 3 4
# 34 "/usr/include/string.h" 2 3 4
# 43 "/usr/include/string.h" 3 4
extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern void *memmove (void *__dest, const void *__src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
int __c, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 4)));
extern void *memset (void *__s, int __c, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern int memcmp (const void *__s1, const void *__s2, size_t __n)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 80 "/usr/include/string.h" 3 4
extern int __memcmpeq (const void *__s1, const void *__s2, size_t __n)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern void *memchr (void *__s, int __c, size_t __n)
noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern const void *memchr (const void *__s, int __c, size_t __n)
noexcept (true) __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 105 "/usr/include/string.h" 3 4
}
# 115 "/usr/include/string.h" 3 4
extern "C++" void *rawmemchr (void *__s, int __c)
noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" const void *rawmemchr (const void *__s, int __c)
noexcept (true) __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" void *memrchr (void *__s, int __c, size_t __n)
noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)))
__attribute__ ((__access__ (__read_only__, 1, 3)));
extern "C++" const void *memrchr (const void *__s, int __c, size_t __n)
noexcept (true) __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)))
__attribute__ ((__access__ (__read_only__, 1, 3)));
# 141 "/usr/include/string.h" 3 4
extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *strncpy (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *strcat (char *__restrict __dest, const char *__restrict __src)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *strncat (char *__restrict __dest, const char *__restrict __src,
size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern int strcmp (const char *__s1, const char *__s2)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncmp (const char *__s1, const char *__s2, size_t __n)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcoll (const char *__s1, const char *__s2)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strxfrm (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
locale_t __l) noexcept (true) __attribute__ ((__nonnull__ (2, 4)))
__attribute__ ((__access__ (__write_only__, 1, 3)));
extern char *strdup (const char *__s)
noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
extern char *strndup (const char *__string, size_t __n)
noexcept (true) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 224 "/usr/include/string.h" 3 4
extern "C++"
{
extern char *strchr (char *__s, int __c)
noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern const char *strchr (const char *__s, int __c)
noexcept (true) __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 244 "/usr/include/string.h" 3 4
}
extern "C++"
{
extern char *strrchr (char *__s, int __c)
noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern const char *strrchr (const char *__s, int __c)
noexcept (true) __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 271 "/usr/include/string.h" 3 4
}
# 281 "/usr/include/string.h" 3 4
extern "C++" char *strchrnul (char *__s, int __c)
noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" const char *strchrnul (const char *__s, int __c)
noexcept (true) __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 293 "/usr/include/string.h" 3 4
extern size_t strcspn (const char *__s, const char *__reject)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strspn (const char *__s, const char *__accept)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *strpbrk (char *__s, const char *__accept)
noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern const char *strpbrk (const char *__s, const char *__accept)
noexcept (true) __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 321 "/usr/include/string.h" 3 4
}
extern "C++"
{
extern char *strstr (char *__haystack, const char *__needle)
noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern const char *strstr (const char *__haystack, const char *__needle)
noexcept (true) __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 348 "/usr/include/string.h" 3 4
}
extern char *strtok (char *__restrict __s, const char *__restrict __delim)
noexcept (true) __attribute__ ((__nonnull__ (2)));
extern char *__strtok_r (char *__restrict __s,
const char *__restrict __delim,
char **__restrict __save_ptr)
noexcept (true) __attribute__ ((__nonnull__ (2, 3)));
extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
char **__restrict __save_ptr)
noexcept (true) __attribute__ ((__nonnull__ (2, 3)));
extern "C++" char *strcasestr (char *__haystack, const char *__needle)
noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++" const char *strcasestr (const char *__haystack,
const char *__needle)
noexcept (true) __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 389 "/usr/include/string.h" 3 4
extern void *memmem (const void *__haystack, size_t __haystacklen,
const void *__needle, size_t __needlelen)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)))
__attribute__ ((__access__ (__read_only__, 1, 2)))
__attribute__ ((__access__ (__read_only__, 3, 4)));
extern void *__mempcpy (void *__restrict __dest,
const void *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
const void *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strlen (const char *__s)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strnlen (const char *__string, size_t __maxlen)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strerror (int __errnum) noexcept (true);
# 444 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
noexcept (true) __attribute__ ((__nonnull__ (2))) __attribute__ ((__access__ (__write_only__, 2, 3)));
extern const char *strerrordesc_np (int __err) noexcept (true);
extern const char *strerrorname_np (int __err) noexcept (true);
extern char *strerror_l (int __errnum, locale_t __l) noexcept (true);
# 1 "/usr/include/strings.h" 1 3 4
# 23 "/usr/include/strings.h" 3 4
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stddef.h" 1 3 4
# 24 "/usr/include/strings.h" 2 3 4
extern "C" {
extern int bcmp (const void *__s1, const void *__s2, size_t __n)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern void bcopy (const void *__src, void *__dest, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern void bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern "C++"
{
extern char *index (char *__s, int __c)
noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern const char *index (const char *__s, int __c)
noexcept (true) __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 66 "/usr/include/strings.h" 3 4
}
extern "C++"
{
extern char *rindex (char *__s, int __c)
noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern const char *rindex (const char *__s, int __c)
noexcept (true) __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 94 "/usr/include/strings.h" 3 4
}
# 104 "/usr/include/strings.h" 3 4
extern int ffs (int __i) noexcept (true) __attribute__ ((__const__));
extern int ffsl (long int __l) noexcept (true) __attribute__ ((__const__));
__extension__ extern int ffsll (long long int __ll)
noexcept (true) __attribute__ ((__const__));
extern int strcasecmp (const char *__s1, const char *__s2)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern int strncasecmp_l (const char *__s1, const char *__s2,
size_t __n, locale_t __loc)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
}
# 463 "/usr/include/string.h" 2 3 4
extern void explicit_bzero (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1)))
__attribute__ ((__access__ (__write_only__, 1, 2)));
extern char *strsep (char **__restrict __stringp,
const char *__restrict __delim)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *strsignal (int __sig) noexcept (true);
extern const char *sigabbrev_np (int __sig) noexcept (true);
extern const char *sigdescr_np (int __sig) noexcept (true);
extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *__stpncpy (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strlcpy (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__write_only__, 1, 3)));
extern size_t strlcat (char *__restrict __dest,
const char *__restrict __src, size_t __n)
noexcept (true) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__access__ (__read_write__, 1, 3)));
extern int strverscmp (const char *__s1, const char *__s2)
noexcept (true) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *strfry (char *__string) noexcept (true) __attribute__ ((__nonnull__ (1)));
extern void *memfrob (void *__s, size_t __n) noexcept (true) __attribute__ ((__nonnull__ (1)))
__attribute__ ((__access__ (__read_write__, 1, 2)));
extern "C++" char *basename (char *__filename)
noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1)));
extern "C++" const char *basename (const char *__filename)
noexcept (true) __asm ("basename") __attribute__ ((__nonnull__ (1)));
# 552 "/usr/include/string.h" 3 4
}
# 43 "/usr/include/c++/13/cstring" 2 3
# 71 "/usr/include/c++/13/cstring" 3
extern "C++"
{
namespace std __attribute__ ((__visibility__ ("default")))
{
using ::memchr;
using ::memcmp;
using ::memcpy;
using ::memmove;
using ::memset;
using ::strcat;
using ::strcmp;
using ::strcoll;
using ::strcpy;
using ::strcspn;
using ::strerror;
using ::strlen;
using ::strncat;
using ::strncmp;
using ::strncpy;
using ::strspn;
using ::strtok;
using ::strxfrm;
using ::strchr;
using ::strpbrk;
using ::strrchr;
using ::strstr;
# 122 "/usr/include/c++/13/cstring" 3
}
}
# 36 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 2
# 44 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
# 1 "/usr/include/c++/13/cassert" 1 3
# 41 "/usr/include/c++/13/cassert" 3
# 42 "/usr/include/c++/13/cassert" 3
# 1 "/usr/include/assert.h" 1 3 4
# 66 "/usr/include/assert.h" 3 4
extern "C" {
extern void __assert_fail (const char *__assertion, const char *__file,
unsigned int __line, const char *__function)
noexcept (true) __attribute__ ((__noreturn__));
extern void __assert_perror_fail (int __errnum, const char *__file,
unsigned int __line, const char *__function)
noexcept (true) __attribute__ ((__noreturn__));
extern void __assert (const char *__assertion, const char *__file, int __line)
noexcept (true) __attribute__ ((__noreturn__));
}
# 45 "/usr/include/c++/13/cassert" 2 3
# 45 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 2
# 186 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
# 1 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdint.h" 1 3 4
# 9 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdint.h" 3 4
# 1 "/usr/include/stdint.h" 1 3 4
# 26 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/libc-header-start.h" 1 3 4
# 27 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wchar.h" 1 3 4
# 29 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/wordsize.h" 1 3 4
# 30 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/stdint-uintn.h" 1 3 4
# 24 "/usr/include/aarch64-linux-gnu/bits/stdint-uintn.h" 3 4
typedef __uint8_t uint8_t;
typedef __uint16_t uint16_t;
typedef __uint32_t uint32_t;
typedef __uint64_t uint64_t;
# 38 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/aarch64-linux-gnu/bits/stdint-least.h" 1 3 4
# 25 "/usr/include/aarch64-linux-gnu/bits/stdint-least.h" 3 4
typedef __int_least8_t int_least8_t;
typedef __int_least16_t int_least16_t;
typedef __int_least32_t int_least32_t;
typedef __int_least64_t int_least64_t;
typedef __uint_least8_t uint_least8_t;
typedef __uint_least16_t uint_least16_t;
typedef __uint_least32_t uint_least32_t;
typedef __uint_least64_t uint_least64_t;
# 42 "/usr/include/stdint.h" 2 3 4
typedef signed char int_fast8_t;
typedef long int int_fast16_t;
typedef long int int_fast32_t;
typedef long int int_fast64_t;
# 60 "/usr/include/stdint.h" 3 4
typedef unsigned char uint_fast8_t;
typedef unsigned long int uint_fast16_t;
typedef unsigned long int uint_fast32_t;
typedef unsigned long int uint_fast64_t;
# 76 "/usr/include/stdint.h" 3 4
typedef long int intptr_t;
typedef unsigned long int uintptr_t;
# 90 "/usr/include/stdint.h" 3 4
typedef __intmax_t intmax_t;
typedef __uintmax_t uintmax_t;
# 10 "/usr/lib/gcc/aarch64-linux-gnu/13/include/stdint.h" 2 3 4
# 187 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 2
# 190 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
typedef uint16_t uc16;
# 239 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
namespace double_conversion {
inline int StrLength(const char* string) {
size_t length = strlen(string);
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
length == static_cast<size_t>(static_cast<int>(length))
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"length == static_cast<size_t>(static_cast<int>(length))"
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 243 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
return static_cast<int>(length);
}
template <typename T>
class Vector {
public:
Vector() : start_(nullptr), length_(0) {}
Vector(T* data, int len) : start_(data), length_(len) {
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
len == 0 || (len > 0 && data != nullptr)
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"len == 0 || (len > 0 && data != nullptr)"
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 253 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
}
Vector<T> SubVector(int from, int to) {
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
to <= length_
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"to <= length_"
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 259 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
from < to
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"from < to"
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 260 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
0 <= from
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"0 <= from"
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 261 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
return Vector<T>(start() + from, to - from);
}
int length() const { return length_; }
bool is_empty() const { return length_ == 0; }
T* start() const { return start_; }
T& operator[](int index) const {
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
0 <= index && index < length_
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"0 <= index && index < length_"
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 276 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
return start_[index];
}
T& first() { return start_[0]; }
T& last() { return start_[length_ - 1]; }
void pop_back() {
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
!is_empty()
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"!is_empty()"
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 285 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
--length_;
}
private:
T* start_;
int length_;
};
class StringBuilder {
public:
StringBuilder(char* buffer, int buffer_size)
: buffer_(buffer, buffer_size), position_(0) { }
~StringBuilder() { if (!is_finalized()) Finalize(); }
int size() const { return buffer_.length(); }
int position() const {
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
!is_finalized()
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"!is_finalized()"
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
return position_;
}
void Reset() { position_ = 0; }
void AddCharacter(char c) {
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
c != '\0'
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"c != '\\0'"
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 320 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
!is_finalized() && position_ < buffer_.length()
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"!is_finalized() && position_ < buffer_.length()"
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 321 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
buffer_[position_++] = c;
}
void AddString(const char* s) {
AddSubstring(s, StrLength(s));
}
void AddSubstring(const char* s, int n) {
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
!is_finalized() && position_ + n < buffer_.length()
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"!is_finalized() && position_ + n < buffer_.length()"
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 334 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
static_cast<size_t>(n) <= strlen(s)
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"static_cast<size_t>(n) <= strlen(s)"
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 335 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
memmove(&buffer_[position_], s, static_cast<size_t>(n));
position_ += n;
}
void AddPadding(char c, int count) {
for (int i = 0; i < count; i++) {
AddCharacter(c);
}
}
char* Finalize() {
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
!is_finalized() && position_ < buffer_.length()
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"!is_finalized() && position_ < buffer_.length()"
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
buffer_[position_] = '\0';
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
strlen(buffer_.start()) == static_cast<size_t>(position_)
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"strlen(buffer_.start()) == static_cast<size_t>(position_)"
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 355 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
position_ = -1;
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
(static_cast <bool> (
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
is_finalized()
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
) ? void (0) : __assert_fail (
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
"is_finalized()"
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 357 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
;
return buffer_.start();
}
private:
Vector<char> buffer_;
int position_;
bool is_finalized() const { return position_ < 0; }
StringBuilder(); StringBuilder(const StringBuilder&); void operator=(const StringBuilder&);
};
# 394 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/utils.h"
template <class Dest, class Source>
Dest BitCast(const Source& source) {
static_assert(sizeof(Dest) == sizeof(Source),
"source and destination size mismatch");
Dest dest;
memmove(&dest, &source, sizeof(dest));
return dest;
}
template <class Dest, class Source>
Dest BitCast(Source* source) {
return BitCast<Dest>(reinterpret_cast<uintptr_t>(source));
}
}
# 32 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/bignum.h" 2
namespace double_conversion {
class Bignum {
public:
static const int kMaxSignificantBits = 3584;
Bignum() : used_bigits_(0), exponent_(0) {}
void AssignUInt16(const uint16_t value);
void AssignUInt64(uint64_t value);
void AssignBignum(const Bignum& other);
void AssignDecimalString(const Vector<const char> value);
void AssignHexString(const Vector<const char> value);
void AssignPowerUInt16(uint16_t base, const int exponent);
void AddUInt64(const uint64_t operand);
void AddBignum(const Bignum& other);
void SubtractBignum(const Bignum& other);
void Square();
void ShiftLeft(const int shift_amount);
void MultiplyByUInt32(const uint32_t factor);
void MultiplyByUInt64(const uint64_t factor);
void MultiplyByPowerOfTen(const int exponent);
void Times10() { return MultiplyByUInt32(10); }
uint16_t DivideModuloIntBignum(const Bignum& other);
bool ToHexString(char* buffer, const int buffer_size) const;
static int Compare(const Bignum& a, const Bignum& b);
static bool Equal(const Bignum& a, const Bignum& b) {
return Compare(a, b) == 0;
}
static bool LessEqual(const Bignum& a, const Bignum& b) {
return Compare(a, b) <= 0;
}
static bool Less(const Bignum& a, const Bignum& b) {
return Compare(a, b) < 0;
}
static int PlusCompare(const Bignum& a, const Bignum& b, const Bignum& c);
static bool PlusEqual(const Bignum& a, const Bignum& b, const Bignum& c) {
return PlusCompare(a, b, c) == 0;
}
static bool PlusLessEqual(const Bignum& a, const Bignum& b, const Bignum& c) {
return PlusCompare(a, b, c) <= 0;
}
static bool PlusLess(const Bignum& a, const Bignum& b, const Bignum& c) {
return PlusCompare(a, b, c) < 0;
}
private:
typedef uint32_t Chunk;
typedef uint64_t DoubleChunk;
static const int kChunkSize = sizeof(Chunk) * 8;
static const int kDoubleChunkSize = sizeof(DoubleChunk) * 8;
static const int kBigitSize = 28;
static const Chunk kBigitMask = (1 << kBigitSize) - 1;
static const int kBigitCapacity = kMaxSignificantBits / kBigitSize;
static void EnsureCapacity(const int size) {
if (size > kBigitCapacity) {
(abort());
}
}
void Align(const Bignum& other);
void Clamp();
bool IsClamped() const {
return used_bigits_ == 0 || RawBigit(used_bigits_ - 1) != 0;
}
void Zero() {
used_bigits_ = 0;
exponent_ = 0;
}
void BigitsShiftLeft(const int shift_amount);
int BigitLength() const { return used_bigits_ + exponent_; }
Chunk& RawBigit(const int index);
const Chunk& RawBigit(const int index) const;
Chunk BigitOrZero(const int index) const;
void SubtractTimes(const Bignum& other, const int factor);
int16_t used_bigits_;
int16_t exponent_;
Chunk bigits_buffer_[kBigitCapacity];
Bignum(const Bignum&); void operator=(const Bignum&);
};
}
# 32 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/cached-powers.h" 1
# 31 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/cached-powers.h"
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 1
# 33 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
namespace double_conversion {
class DiyFp {
public:
static const int kSignificandSize = 64;
DiyFp() : f_(0), e_(0) {}
DiyFp(const uint64_t significand, const int32_t exponent) : f_(significand), e_(exponent) {}
void Subtract(const DiyFp& other) {
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
(static_cast <bool> (
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
e_ == other.e_
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
) ? void (0) : __assert_fail (
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
"e_ == other.e_"
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 53 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
;
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
(static_cast <bool> (
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
f_ >= other.f_
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
) ? void (0) : __assert_fail (
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
"f_ >= other.f_"
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 54 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
;
f_ -= other.f_;
}
static DiyFp Minus(const DiyFp& a, const DiyFp& b) {
DiyFp result = a;
result.Subtract(b);
return result;
}
void Multiply(const DiyFp& other) {
const uint64_t kM32 = 0xFFFFFFFFU;
const uint64_t a = f_ >> 32;
const uint64_t b = f_ & kM32;
const uint64_t c = other.f_ >> 32;
const uint64_t d = other.f_ & kM32;
const uint64_t ac = a * c;
const uint64_t bc = b * c;
const uint64_t ad = a * d;
const uint64_t bd = b * d;
const uint64_t tmp = (bd >> 32) + (ad & kM32) + (bc & kM32) + (1U << 31);
e_ += other.e_ + 64;
f_ = ac + (ad >> 32) + (bc >> 32) + (tmp >> 32);
}
static DiyFp Times(const DiyFp& a, const DiyFp& b) {
DiyFp result = a;
result.Multiply(b);
return result;
}
void Normalize() {
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
(static_cast <bool> (
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
f_ != 0
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
) ? void (0) : __assert_fail (
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
"f_ != 0"
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 97 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/diy-fp.h"
;
uint64_t significand = f_;
int32_t exponent = e_;
const uint64_t k10MSBits = (((static_cast<uint64_t>(0xFFC00000) << 32) + 0x00000000u));
while ((significand & k10MSBits) == 0) {
significand <<= 10;
exponent -= 10;
}
while ((significand & kUint64MSB) == 0) {
significand <<= 1;
exponent--;
}
f_ = significand;
e_ = exponent;
}
static DiyFp Normalize(const DiyFp& a) {
DiyFp result = a;
result.Normalize();
return result;
}
uint64_t f() const { return f_; }
int32_t e() const { return e_; }
void set_f(uint64_t new_value) { f_ = new_value; }
void set_e(int32_t new_value) { e_ = new_value; }
private:
static const uint64_t kUint64MSB = (((static_cast<uint64_t>(0x80000000) << 32) + 0x00000000u));
uint64_t f_;
int32_t e_;
};
}
# 32 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/cached-powers.h" 2
namespace double_conversion {
namespace PowersOfTenCache {
static const int kDecimalExponentDistance = 8;
static const int kMinDecimalExponent = -348;
static const int kMaxDecimalExponent = 340;
void GetCachedPowerForBinaryExponentRange(int min_exponent,
int max_exponent,
DiyFp* power,
int* decimal_exponent);
void GetCachedPowerForDecimalExponent(int requested_exponent,
DiyFp* power,
int* found_exponent);
}
}
# 33 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 1
# 33 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
namespace double_conversion {
static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }
static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
static uint32_t float_to_uint32(float f) { return BitCast<uint32_t>(f); }
static float uint32_to_float(uint32_t d32) { return BitCast<float>(d32); }
class Double {
public:
static const uint64_t kSignMask = (((static_cast<uint64_t>(0x80000000) << 32) + 0x00000000u));
static const uint64_t kExponentMask = (((static_cast<uint64_t>(0x7FF00000) << 32) + 0x00000000u));
static const uint64_t kSignificandMask = (((static_cast<uint64_t>(0x000FFFFF) << 32) + 0xFFFFFFFFu));
static const uint64_t kHiddenBit = (((static_cast<uint64_t>(0x00100000) << 32) + 0x00000000u));
static const uint64_t kQuietNanBit = (((static_cast<uint64_t>(0x00080000) << 32) + 0x00000000u));
static const int kPhysicalSignificandSize = 52;
static const int kSignificandSize = 53;
static const int kExponentBias = 0x3FF + kPhysicalSignificandSize;
static const int kMaxExponent = 0x7FF - kExponentBias;
Double() : d64_(0) {}
explicit Double(double d) : d64_(double_to_uint64(d)) {}
explicit Double(uint64_t d64) : d64_(d64) {}
explicit Double(DiyFp diy_fp)
: d64_(DiyFpToUint64(diy_fp)) {}
DiyFp AsDiyFp() const {
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
Sign() > 0
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"Sign() > 0"
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 63 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
!IsSpecial()
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"!IsSpecial()"
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 64 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
return DiyFp(Significand(), Exponent());
}
DiyFp AsNormalizedDiyFp() const {
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
value() > 0.0
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"value() > 0.0"
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 70 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
uint64_t f = Significand();
int e = Exponent();
while ((f & kHiddenBit) == 0) {
f <<= 1;
e--;
}
f <<= DiyFp::kSignificandSize - kSignificandSize;
e -= DiyFp::kSignificandSize - kSignificandSize;
return DiyFp(f, e);
}
uint64_t AsUint64() const {
return d64_;
}
double NextDouble() const {
if (d64_ == kInfinity) return Double(kInfinity).value();
if (Sign() < 0 && Significand() == 0) {
return 0.0;
}
if (Sign() < 0) {
return Double(d64_ - 1).value();
} else {
return Double(d64_ + 1).value();
}
}
double PreviousDouble() const {
if (d64_ == (kInfinity | kSignMask)) return -Infinity();
if (Sign() < 0) {
return Double(d64_ + 1).value();
} else {
if (Significand() == 0) return -0.0;
return Double(d64_ - 1).value();
}
}
int Exponent() const {
if (IsDenormal()) return kDenormalExponent;
uint64_t d64 = AsUint64();
int biased_e =
static_cast<int>((d64 & kExponentMask) >> kPhysicalSignificandSize);
return biased_e - kExponentBias;
}
uint64_t Significand() const {
uint64_t d64 = AsUint64();
uint64_t significand = d64 & kSignificandMask;
if (!IsDenormal()) {
return significand + kHiddenBit;
} else {
return significand;
}
}
bool IsDenormal() const {
uint64_t d64 = AsUint64();
return (d64 & kExponentMask) == 0;
}
bool IsSpecial() const {
uint64_t d64 = AsUint64();
return (d64 & kExponentMask) == kExponentMask;
}
bool IsNan() const {
uint64_t d64 = AsUint64();
return ((d64 & kExponentMask) == kExponentMask) &&
((d64 & kSignificandMask) != 0);
}
bool IsQuietNan() const {
return IsNan() && ((AsUint64() & kQuietNanBit) != 0);
}
bool IsSignalingNan() const {
return IsNan() && ((AsUint64() & kQuietNanBit) == 0);
}
bool IsInfinite() const {
uint64_t d64 = AsUint64();
return ((d64 & kExponentMask) == kExponentMask) &&
((d64 & kSignificandMask) == 0);
}
int Sign() const {
uint64_t d64 = AsUint64();
return (d64 & kSignMask) == 0? 1: -1;
}
DiyFp UpperBoundary() const {
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
Sign() > 0
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"Sign() > 0"
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 183 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
return DiyFp(Significand() * 2 + 1, Exponent() - 1);
}
void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const {
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
value() > 0.0
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"value() > 0.0"
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 192 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
DiyFp v = this->AsDiyFp();
DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1));
DiyFp m_minus;
if (LowerBoundaryIsCloser()) {
m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2);
} else {
m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1);
}
m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e()));
m_minus.set_e(m_plus.e());
*out_m_plus = m_plus;
*out_m_minus = m_minus;
}
bool LowerBoundaryIsCloser() const {
# 216 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
bool physical_significand_is_zero = ((AsUint64() & kSignificandMask) == 0);
return physical_significand_is_zero && (Exponent() != kDenormalExponent);
}
double value() const { return uint64_to_double(d64_); }
static int SignificandSizeForOrderOfMagnitude(int order) {
if (order >= (kDenormalExponent + kSignificandSize)) {
return kSignificandSize;
}
if (order <= kDenormalExponent) return 0;
return order - kDenormalExponent;
}
static double Infinity() {
return Double(kInfinity).value();
}
static double NaN() {
return Double(kNaN).value();
}
private:
static const int kDenormalExponent = -kExponentBias + 1;
static const uint64_t kInfinity = (((static_cast<uint64_t>(0x7FF00000) << 32) + 0x00000000u));
static const uint64_t kNaN = (((static_cast<uint64_t>(0x7FF80000) << 32) + 0x00000000u));
const uint64_t d64_;
static uint64_t DiyFpToUint64(DiyFp diy_fp) {
uint64_t significand = diy_fp.f();
int exponent = diy_fp.e();
while (significand > kHiddenBit + kSignificandMask) {
significand >>= 1;
exponent++;
}
if (exponent >= kMaxExponent) {
return kInfinity;
}
if (exponent < kDenormalExponent) {
return 0;
}
while (exponent > kDenormalExponent && (significand & kHiddenBit) == 0) {
significand <<= 1;
exponent--;
}
uint64_t biased_exponent;
if (exponent == kDenormalExponent && (significand & kHiddenBit) == 0) {
biased_exponent = 0;
} else {
biased_exponent = static_cast<uint64_t>(exponent + kExponentBias);
}
return (significand & kSignificandMask) |
(biased_exponent << kPhysicalSignificandSize);
}
Double(const Double&); void operator=(const Double&);
};
class Single {
public:
static const uint32_t kSignMask = 0x80000000;
static const uint32_t kExponentMask = 0x7F800000;
static const uint32_t kSignificandMask = 0x007FFFFF;
static const uint32_t kHiddenBit = 0x00800000;
static const uint32_t kQuietNanBit = 0x00400000;
static const int kPhysicalSignificandSize = 23;
static const int kSignificandSize = 24;
Single() : d32_(0) {}
explicit Single(float f) : d32_(float_to_uint32(f)) {}
explicit Single(uint32_t d32) : d32_(d32) {}
DiyFp AsDiyFp() const {
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
Sign() > 0
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"Sign() > 0"
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 303 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
!IsSpecial()
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"!IsSpecial()"
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 304 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
return DiyFp(Significand(), Exponent());
}
uint32_t AsUint32() const {
return d32_;
}
int Exponent() const {
if (IsDenormal()) return kDenormalExponent;
uint32_t d32 = AsUint32();
int biased_e =
static_cast<int>((d32 & kExponentMask) >> kPhysicalSignificandSize);
return biased_e - kExponentBias;
}
uint32_t Significand() const {
uint32_t d32 = AsUint32();
uint32_t significand = d32 & kSignificandMask;
if (!IsDenormal()) {
return significand + kHiddenBit;
} else {
return significand;
}
}
bool IsDenormal() const {
uint32_t d32 = AsUint32();
return (d32 & kExponentMask) == 0;
}
bool IsSpecial() const {
uint32_t d32 = AsUint32();
return (d32 & kExponentMask) == kExponentMask;
}
bool IsNan() const {
uint32_t d32 = AsUint32();
return ((d32 & kExponentMask) == kExponentMask) &&
((d32 & kSignificandMask) != 0);
}
bool IsQuietNan() const {
return IsNan() && ((AsUint32() & kQuietNanBit) != 0);
}
bool IsSignalingNan() const {
return IsNan() && ((AsUint32() & kQuietNanBit) == 0);
}
bool IsInfinite() const {
uint32_t d32 = AsUint32();
return ((d32 & kExponentMask) == kExponentMask) &&
((d32 & kSignificandMask) == 0);
}
int Sign() const {
uint32_t d32 = AsUint32();
return (d32 & kSignMask) == 0? 1: -1;
}
void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const {
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
value() > 0.0
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"value() > 0.0"
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 384 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
DiyFp v = this->AsDiyFp();
DiyFp m_plus = DiyFp::Normalize(DiyFp((v.f() << 1) + 1, v.e() - 1));
DiyFp m_minus;
if (LowerBoundaryIsCloser()) {
m_minus = DiyFp((v.f() << 2) - 1, v.e() - 2);
} else {
m_minus = DiyFp((v.f() << 1) - 1, v.e() - 1);
}
m_minus.set_f(m_minus.f() << (m_minus.e() - m_plus.e()));
m_minus.set_e(m_plus.e());
*out_m_plus = m_plus;
*out_m_minus = m_minus;
}
DiyFp UpperBoundary() const {
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
(static_cast <bool> (
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
Sign() > 0
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
) ? void (0) : __assert_fail (
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
"Sign() > 0"
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 402 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
;
return DiyFp(Significand() * 2 + 1, Exponent() - 1);
}
bool LowerBoundaryIsCloser() const {
# 415 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/ieee.h"
bool physical_significand_is_zero = ((AsUint32() & kSignificandMask) == 0);
return physical_significand_is_zero && (Exponent() != kDenormalExponent);
}
float value() const { return uint32_to_float(d32_); }
static float Infinity() {
return Single(kInfinity).value();
}
static float NaN() {
return Single(kNaN).value();
}
private:
static const int kExponentBias = 0x7F + kPhysicalSignificandSize;
static const int kDenormalExponent = -kExponentBias + 1;
static const int kMaxExponent = 0xFF - kExponentBias;
static const uint32_t kInfinity = 0x7F800000;
static const uint32_t kNaN = 0x7FC00000;
const uint32_t d32_;
Single(const Single&); void operator=(const Single&);
};
}
# 34 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
# 1 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.h" 1
# 33 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.h"
namespace double_conversion {
double Strtod(Vector<const char> buffer, int exponent);
float Strtof(Vector<const char> buffer, int exponent);
double StrtodTrimmed(Vector<const char> trimmed, int exponent);
float StrtofTrimmed(Vector<const char> trimmed, int exponent);
inline Vector<const char> TrimTrailingZeros(Vector<const char> buffer) {
for (int i = buffer.length() - 1; i >= 0; --i) {
if (buffer[i] != '0') {
return buffer.SubVector(0, i + 1);
}
}
return Vector<const char>(buffer.start(), 0);
}
}
# 35 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 2
namespace double_conversion {
static const int kMaxExactDoubleIntegerDecimalDigits = 15;
static const int kMaxUint64DecimalDigits = 19;
static const int kMaxDecimalPower = 309;
static const int kMinDecimalPower = -324;
static const uint64_t kMaxUint64 = (((static_cast<uint64_t>(0xFFFFFFFF) << 32) + 0xFFFFFFFFu));
static const double exact_powers_of_ten[] = {
1.0,
10.0,
100.0,
1000.0,
10000.0,
100000.0,
1000000.0,
10000000.0,
100000000.0,
1000000000.0,
10000000000.0,
100000000000.0,
1000000000000.0,
10000000000000.0,
100000000000000.0,
1000000000000000.0,
10000000000000000.0,
100000000000000000.0,
1000000000000000000.0,
10000000000000000000.0,
100000000000000000000.0,
1000000000000000000000.0,
10000000000000000000000.0
};
static const int kExactPowersOfTenSize = ((sizeof(exact_powers_of_ten) / sizeof(*(exact_powers_of_ten))) / static_cast<size_t>(!(sizeof(exact_powers_of_ten) % sizeof(*(exact_powers_of_ten)))));
static const int kMaxSignificantDecimalDigits = 780;
static Vector<const char> TrimLeadingZeros(Vector<const char> buffer) {
for (int i = 0; i < buffer.length(); i++) {
if (buffer[i] != '0') {
return buffer.SubVector(i, buffer.length());
}
}
return Vector<const char>(buffer.start(), 0);
}
static void CutToMaxSignificantDigits(Vector<const char> buffer,
int exponent,
char* significant_buffer,
int* significant_exponent) {
for (int i = 0; i < kMaxSignificantDecimalDigits - 1; ++i) {
significant_buffer[i] = buffer[i];
}
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
buffer[buffer.length() - 1] != '0'
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"buffer[buffer.length() - 1] != '0'"
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 113 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
significant_buffer[kMaxSignificantDecimalDigits - 1] = '1';
*significant_exponent =
exponent + (buffer.length() - kMaxSignificantDecimalDigits);
}
static void TrimAndCut(Vector<const char> buffer, int exponent,
char* buffer_copy_space, int space_size,
Vector<const char>* trimmed, int* updated_exponent) {
Vector<const char> left_trimmed = TrimLeadingZeros(buffer);
Vector<const char> right_trimmed = TrimTrailingZeros(left_trimmed);
exponent += left_trimmed.length() - right_trimmed.length();
if (right_trimmed.length() > kMaxSignificantDecimalDigits) {
(void) space_size;
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
space_size >= kMaxSignificantDecimalDigits
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"space_size >= kMaxSignificantDecimalDigits"
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 134 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
CutToMaxSignificantDigits(right_trimmed, exponent,
buffer_copy_space, updated_exponent);
*trimmed = Vector<const char>(buffer_copy_space,
kMaxSignificantDecimalDigits);
} else {
*trimmed = right_trimmed;
*updated_exponent = exponent;
}
}
static uint64_t ReadUint64(Vector<const char> buffer,
int* number_of_read_digits) {
uint64_t result = 0;
int i = 0;
while (i < buffer.length() && result <= (kMaxUint64 / 10 - 1)) {
int digit = buffer[i++] - '0';
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
0 <= digit && digit <= 9
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"0 <= digit && digit <= 9"
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 157 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
result = 10 * result + digit;
}
*number_of_read_digits = i;
return result;
}
static void ReadDiyFp(Vector<const char> buffer,
DiyFp* result,
int* remaining_decimals) {
int read_digits;
uint64_t significand = ReadUint64(buffer, &read_digits);
if (buffer.length() == read_digits) {
*result = DiyFp(significand, 0);
*remaining_decimals = 0;
} else {
if (buffer[read_digits] >= '5') {
significand++;
}
int exponent = 0;
*result = DiyFp(significand, exponent);
*remaining_decimals = buffer.length() - read_digits;
}
}
static bool DoubleStrtod(Vector<const char> trimmed,
int exponent,
double* result) {
# 204 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
if (trimmed.length() <= kMaxExactDoubleIntegerDecimalDigits) {
int read_digits;
if (exponent < 0 && -exponent < kExactPowersOfTenSize) {
*result = static_cast<double>(ReadUint64(trimmed, &read_digits));
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
read_digits == trimmed.length()
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"read_digits == trimmed.length()"
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 215 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
*result /= exact_powers_of_ten[-exponent];
return true;
}
if (0 <= exponent && exponent < kExactPowersOfTenSize) {
*result = static_cast<double>(ReadUint64(trimmed, &read_digits));
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
read_digits == trimmed.length()
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"read_digits == trimmed.length()"
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 222 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
*result *= exact_powers_of_ten[exponent];
return true;
}
int remaining_digits =
kMaxExactDoubleIntegerDecimalDigits - trimmed.length();
if ((0 <= exponent) &&
(exponent - remaining_digits < kExactPowersOfTenSize)) {
*result = static_cast<double>(ReadUint64(trimmed, &read_digits));
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
read_digits == trimmed.length()
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"read_digits == trimmed.length()"
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 234 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
*result *= exact_powers_of_ten[remaining_digits];
*result *= exact_powers_of_ten[exponent - remaining_digits];
return true;
}
}
return false;
}
static DiyFp AdjustmentPowerOfTen(int exponent) {
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
0 < exponent
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"0 < exponent"
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 248 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
exponent < PowersOfTenCache::kDecimalExponentDistance
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"exponent < PowersOfTenCache::kDecimalExponentDistance"
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 249 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
PowersOfTenCache::kDecimalExponentDistance == 8
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"PowersOfTenCache::kDecimalExponentDistance == 8"
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 252 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
switch (exponent) {
case 1: return DiyFp((((static_cast<uint64_t>(0xa0000000) << 32) + 0x00000000u)), -60);
case 2: return DiyFp((((static_cast<uint64_t>(0xc8000000) << 32) + 0x00000000u)), -57);
case 3: return DiyFp((((static_cast<uint64_t>(0xfa000000) << 32) + 0x00000000u)), -54);
case 4: return DiyFp((((static_cast<uint64_t>(0x9c400000) << 32) + 0x00000000u)), -50);
case 5: return DiyFp((((static_cast<uint64_t>(0xc3500000) << 32) + 0x00000000u)), -47);
case 6: return DiyFp((((static_cast<uint64_t>(0xf4240000) << 32) + 0x00000000u)), -44);
case 7: return DiyFp((((static_cast<uint64_t>(0x98968000) << 32) + 0x00000000u)), -40);
default:
(abort());
}
}
static bool DiyFpStrtod(Vector<const char> buffer,
int exponent,
double* result) {
DiyFp input;
int remaining_decimals;
ReadDiyFp(buffer, &input, &remaining_decimals);
const int kDenominatorLog = 3;
const int kDenominator = 1 << kDenominatorLog;
exponent += remaining_decimals;
uint64_t error = (remaining_decimals == 0 ? 0 : kDenominator / 2);
int old_e = input.e();
input.Normalize();
error <<= old_e - input.e();
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
exponent <= PowersOfTenCache::kMaxDecimalExponent
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"exponent <= PowersOfTenCache::kMaxDecimalExponent"
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 291 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
if (exponent < PowersOfTenCache::kMinDecimalExponent) {
*result = 0.0;
return true;
}
DiyFp cached_power;
int cached_decimal_exponent;
PowersOfTenCache::GetCachedPowerForDecimalExponent(exponent,
&cached_power,
&cached_decimal_exponent);
if (cached_decimal_exponent != exponent) {
int adjustment_exponent = exponent - cached_decimal_exponent;
DiyFp adjustment_power = AdjustmentPowerOfTen(adjustment_exponent);
input.Multiply(adjustment_power);
if (kMaxUint64DecimalDigits - buffer.length() >= adjustment_exponent) {
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
DiyFp::kSignificandSize == 64
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"DiyFp::kSignificandSize == 64"
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 309 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
} else {
error += kDenominator / 2;
}
}
input.Multiply(cached_power);
int error_b = kDenominator / 2;
int error_ab = (error == 0 ? 0 : 1);
int fixed_error = kDenominator / 2;
error += error_b + error_ab + fixed_error;
old_e = input.e();
input.Normalize();
error <<= old_e - input.e();
int order_of_magnitude = DiyFp::kSignificandSize + input.e();
int effective_significand_size =
Double::SignificandSizeForOrderOfMagnitude(order_of_magnitude);
int precision_digits_count =
DiyFp::kSignificandSize - effective_significand_size;
if (precision_digits_count + kDenominatorLog >= DiyFp::kSignificandSize) {
int shift_amount = (precision_digits_count + kDenominatorLog) -
DiyFp::kSignificandSize + 1;
input.set_f(input.f() >> shift_amount);
input.set_e(input.e() + shift_amount);
error = (error >> shift_amount) + 1 + kDenominator;
precision_digits_count -= shift_amount;
}
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
DiyFp::kSignificandSize == 64
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"DiyFp::kSignificandSize == 64"
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 351 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
precision_digits_count < 64
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"precision_digits_count < 64"
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 352 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
uint64_t one64 = 1;
uint64_t precision_bits_mask = (one64 << precision_digits_count) - 1;
uint64_t precision_bits = input.f() & precision_bits_mask;
uint64_t half_way = one64 << (precision_digits_count - 1);
precision_bits *= kDenominator;
half_way *= kDenominator;
DiyFp rounded_input(input.f() >> precision_digits_count,
input.e() + precision_digits_count);
if (precision_bits >= half_way + error) {
rounded_input.set_f(rounded_input.f() + 1);
}
*result = Double(rounded_input).value();
if (half_way - error < precision_bits && precision_bits < half_way + error) {
return false;
} else {
return true;
}
}
# 388 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
static int CompareBufferWithDiyFp(Vector<const char> buffer,
int exponent,
DiyFp diy_fp) {
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
buffer.length() + exponent <= kMaxDecimalPower + 1
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"buffer.length() + exponent <= kMaxDecimalPower + 1"
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 391 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
buffer.length() + exponent > kMinDecimalPower
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"buffer.length() + exponent > kMinDecimalPower"
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 392 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
buffer.length() <= kMaxSignificantDecimalDigits
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"buffer.length() <= kMaxSignificantDecimalDigits"
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 393 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"((kMaxDecimalPower + 1) * 333 / 100) < Bignum::kMaxSignificantBits"
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 398 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
Bignum buffer_bignum;
Bignum diy_fp_bignum;
buffer_bignum.AssignDecimalString(buffer);
diy_fp_bignum.AssignUInt64(diy_fp.f());
if (exponent >= 0) {
buffer_bignum.MultiplyByPowerOfTen(exponent);
} else {
diy_fp_bignum.MultiplyByPowerOfTen(-exponent);
}
if (diy_fp.e() > 0) {
diy_fp_bignum.ShiftLeft(diy_fp.e());
} else {
buffer_bignum.ShiftLeft(-diy_fp.e());
}
return Bignum::Compare(buffer_bignum, diy_fp_bignum);
}
static bool ComputeGuess(Vector<const char> trimmed, int exponent,
double* guess) {
if (trimmed.length() == 0) {
*guess = 0.0;
return true;
}
if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) {
*guess = Double::Infinity();
return true;
}
if (exponent + trimmed.length() <= kMinDecimalPower) {
*guess = 0.0;
return true;
}
if (DoubleStrtod(trimmed, exponent, guess) ||
DiyFpStrtod(trimmed, exponent, guess)) {
return true;
}
if (*guess == Double::Infinity()) {
return true;
}
return false;
}
static bool IsDigit(const char d) {
return ('0' <= d) && (d <= '9');
}
static bool IsNonZeroDigit(const char d) {
return ('1' <= d) && (d <= '9');
}
[[maybe_unused]]
static bool AssertTrimmedDigits(const Vector<const char>& buffer) {
for(int i = 0; i < buffer.length(); ++i) {
if(!IsDigit(buffer[i])) {
return false;
}
}
return (buffer.length() == 0) || (IsNonZeroDigit(buffer[0]) && IsNonZeroDigit(buffer[buffer.length()-1]));
}
double StrtodTrimmed(Vector<const char> trimmed, int exponent) {
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
trimmed.length() <= kMaxSignificantDecimalDigits
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"trimmed.length() <= kMaxSignificantDecimalDigits"
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 467 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
AssertTrimmedDigits(trimmed)
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"AssertTrimmedDigits(trimmed)"
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 468 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
double guess;
const bool is_correct = ComputeGuess(trimmed, exponent, &guess);
if (is_correct) {
return guess;
}
DiyFp upper_boundary = Double(guess).UpperBoundary();
int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
if (comparison < 0) {
return guess;
} else if (comparison > 0) {
return Double(guess).NextDouble();
} else if ((Double(guess).Significand() & 1) == 0) {
return guess;
} else {
return Double(guess).NextDouble();
}
}
double Strtod(Vector<const char> buffer, int exponent) {
char copy_buffer[kMaxSignificantDecimalDigits];
Vector<const char> trimmed;
int updated_exponent;
TrimAndCut(buffer, exponent, copy_buffer, kMaxSignificantDecimalDigits,
&trimmed, &updated_exponent);
return StrtodTrimmed(trimmed, updated_exponent);
}
static float SanitizedDoubletof(double d) {
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
d >= 0.0
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"d >= 0.0"
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 498 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
float max_finite = 3.4028234663852885981170418348451692544e+38;
double half_max_finite_infinity =
3.40282356779733661637539395458142568448e+38;
if (d >= max_finite) {
if (d >= half_max_finite_infinity) {
return Single::Infinity();
} else {
return max_finite;
}
} else {
return static_cast<float>(d);
}
}
float Strtof(Vector<const char> buffer, int exponent) {
char copy_buffer[kMaxSignificantDecimalDigits];
Vector<const char> trimmed;
int updated_exponent;
TrimAndCut(buffer, exponent, copy_buffer, kMaxSignificantDecimalDigits,
&trimmed, &updated_exponent);
exponent = updated_exponent;
return StrtofTrimmed(trimmed, exponent);
}
float StrtofTrimmed(Vector<const char> trimmed, int exponent) {
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
trimmed.length() <= kMaxSignificantDecimalDigits
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"trimmed.length() <= kMaxSignificantDecimalDigits"
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 532 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
AssertTrimmedDigits(trimmed)
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"AssertTrimmedDigits(trimmed)"
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 533 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
double double_guess;
bool is_correct = ComputeGuess(trimmed, exponent, &double_guess);
float float_guess = SanitizedDoubletof(double_guess);
if (float_guess == double_guess) {
return float_guess;
}
# 558 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
double double_next = Double(double_guess).NextDouble();
double double_previous = Double(double_guess).PreviousDouble();
float f1 = SanitizedDoubletof(double_previous);
float f2 = float_guess;
float f3 = SanitizedDoubletof(double_next);
float f4;
if (is_correct) {
f4 = f3;
} else {
double double_next2 = Double(double_next).NextDouble();
f4 = SanitizedDoubletof(double_next2);
}
(void) f2;
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
f1 <= f2 && f2 <= f3 && f3 <= f4
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"f1 <= f2 && f2 <= f3 && f3 <= f4"
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 572 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
if (f1 == f4) {
return float_guess;
}
# 580 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
(static_cast <bool> (
# 580 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
(f1 != f2 && f2 == f3 && f3 == f4) || (f1 == f2 && f2 != f3 && f3 == f4) || (f1 == f2 && f2 == f3 && f3 != f4)
# 580 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
) ? void (0) : __assert_fail (
# 580 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
"(f1 != f2 && f2 == f3 && f3 == f4) || (f1 == f2 && f2 != f3 && f3 == f4) || (f1 == f2 && f2 == f3 && f3 != f4)"
# 580 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc" 3 4
, __builtin_FILE (), __builtin_LINE (), __extension__ __PRETTY_FUNCTION__))
# 582 "/tmp/tmpl_i20ey9/double-conversion/double-conversion/strtod.cc"
;
float guess = f1;
float next = f4;
DiyFp upper_boundary;
if (guess == 0.0f) {
float min_float = 1e-45f;
upper_boundary = Double(static_cast<double>(min_float) / 2).AsDiyFp();
} else {
upper_boundary = Single(guess).UpperBoundary();
}
int comparison = CompareBufferWithDiyFp(trimmed, exponent, upper_boundary);
if (comparison < 0) {
return guess;
} else if (comparison > 0) {
return next;
} else if ((Single(guess).Significand() & 1) == 0) {
return guess;
} else {
return next;
}
}
}