// File: /workspace/github_c_makefile_star2_O0/fukunagatsu[P]RIblast/./fmath.hpp
// Function: fmath::expd(double)
inline double expd(double x)
{
	if (x <= -708.39641853226408) return 0;
	if (x >= 709.78271289338397) return std::numeric_limits<double>::infinity();
	using namespace local;
	const ExpdVar<>& c = C<>::expdVar;
#if 1
	const double _b = double(uint64_t(3) << 51);
	__m128d b = _mm_load_sd(&_b);
	__m128d xx = _mm_load_sd(&x);
	__m128d d = _mm_add_sd(_mm_mul_sd(xx, _mm_load_sd(&c.a)), b);
	uint64_t di = _mm_cvtsi128_si32(_mm_castpd_si128(d));
	uint64_t iax = c.tbl[di & mask(c.sbit)];
	__m128d _t = _mm_sub_sd(_mm_mul_sd(_mm_sub_sd(d, b), _mm_load_sd(&c.ra)), xx);
	uint64_t u = ((di + c.adj) >> c.sbit) << 52;
	double t;
	_mm_store_sd(&t, _t);
	double y = (c.C3[0] - t) * (t * t) * c.C2[0] - t + c.C1[0];
	double did;
	u |= iax;
	memcpy(&did, &u, sizeof(did));
	return y * did;
#else
/*
	remark : -ffast-math option of gcc may generate bad code for fmath::expd
*/
	const uint64_t b = 3ULL << 51;
	di di;
	di.d = x * c.a + b;
	uint64_t iax = c.tbl[di.i & mask(c.sbit)];

	double t = (di.d - b) * c.ra - x;
	uint64_t u = ((di.i + c.adj) >> c.sbit) << 52;
	double y = (c.C3[0] - t) * (t * t) * c.C2[0] - t + c.C1[0];

	di.i = u | iax;
	return y * di.d;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movsd %xmm0, -0x180(%rbp)
movsd 0x2376d(%rip), %xmm0    # 0x38958
ucomisd -0x180(%rbp), %xmm0
jb 0x15205
xorps %xmm0, %xmm0
movsd %xmm0, -0x178(%rbp)
jmp 0x155a3
movsd -0x180(%rbp), %xmm0
movsd 0x2374b(%rip), %xmm1    # 0x38960
ucomisd %xmm1, %xmm0
jb 0x1522d
callq 0x15df0
movsd %xmm0, -0x178(%rbp)
jmp 0x155a3
leaq 0xfbe0c(%rip), %rax     # 0x111040
movq %rax, -0x208(%rbp)
movq %rax, -0x188(%rbp)
movabsq $0x4338000000000000, %rax # imm = 0x4338000000000000
movq %rax, -0x190(%rbp)
leaq -0x190(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0x100(%rbp), %xmm0
movapd %xmm0, -0x110(%rbp)
movapd -0x110(%rbp), %xmm0
movapd %xmm0, -0x1a0(%rbp)
leaq -0x180(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x120(%rbp)
movsd -0x120(%rbp), %xmm0
movapd %xmm0, -0x130(%rbp)
movapd -0x130(%rbp), %xmm0
movapd %xmm0, -0x1b0(%rbp)
movapd -0x1b0(%rbp), %xmm1
leaq 0xffd8c(%rip), %rax     # 0x115070
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x140(%rbp)
movsd -0x140(%rbp), %xmm0
movapd %xmm0, -0x150(%rbp)
movapd -0x150(%rbp), %xmm0
movapd %xmm1, -0xa0(%rbp)
movapd %xmm0, -0xb0(%rbp)
movsd -0xb0(%rbp), %xmm1
movapd -0xa0(%rbp), %xmm0
mulsd %xmm1, %xmm0
movapd %xmm0, -0xa0(%rbp)
movapd -0xa0(%rbp), %xmm1
movapd -0x1a0(%rbp), %xmm0
movapd %xmm1, -0xe0(%rbp)
movapd %xmm0, -0xf0(%rbp)
movsd -0xf0(%rbp), %xmm1
movapd -0xe0(%rbp), %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, -0xe0(%rbp)
movapd -0xe0(%rbp), %xmm0
movapd %xmm0, -0x1c0(%rbp)
movapd -0x1c0(%rbp), %xmm0
movapd %xmm0, -0x70(%rbp)
movapd -0x70(%rbp), %xmm0
movapd %xmm0, -0x80(%rbp)
movaps -0x80(%rbp), %xmm0
movaps %xmm0, -0x90(%rbp)
movslq -0x90(%rbp), %rax
movq %rax, -0x1c8(%rbp)
movl -0x1c8(%rbp), %eax
movl %eax, -0x20c(%rbp)
movl $0xb, %edi
callq 0x15dd0
movl -0x20c(%rbp), %ecx
movl %eax, %edx
movq -0x208(%rbp), %rax
andl %edx, %ecx
movq 0x30(%rax,%rcx,8), %rax
movq %rax, -0x1d0(%rbp)
movapd -0x1c0(%rbp), %xmm1
movapd -0x1a0(%rbp), %xmm0
movapd %xmm1, -0x30(%rbp)
movapd %xmm0, -0x40(%rbp)
movsd -0x40(%rbp), %xmm1
movapd -0x30(%rbp), %xmm0
subsd %xmm1, %xmm0
movapd %xmm0, -0x30(%rbp)
movapd -0x30(%rbp), %xmm1
leaq 0xffc4e(%rip), %rax     # 0x115078
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x160(%rbp)
movsd -0x160(%rbp), %xmm0
movapd %xmm0, -0x170(%rbp)
movapd -0x170(%rbp), %xmm0
movapd %xmm1, -0xc0(%rbp)
movapd %xmm0, -0xd0(%rbp)
movsd -0xd0(%rbp), %xmm1
movapd -0xc0(%rbp), %xmm0
mulsd %xmm1, %xmm0
movapd %xmm0, -0xc0(%rbp)
movapd -0xc0(%rbp), %xmm1
movapd -0x1b0(%rbp), %xmm0
movapd %xmm1, -0x50(%rbp)
movapd %xmm0, -0x60(%rbp)
movsd -0x60(%rbp), %xmm1
movapd -0x50(%rbp), %xmm0
subsd %xmm1, %xmm0
movapd %xmm0, -0x50(%rbp)
movapd -0x50(%rbp), %xmm0
movapd %xmm0, -0x1e0(%rbp)
movl -0x1c8(%rbp), %ecx
addl $0x1ff800, %ecx         # imm = 0x1FF800
movl %ecx, %eax
andl $0x7ff800, %eax         # imm = 0x7FF800
shlq $0x29, %rax
movq %rax, -0x1e8(%rbp)
movapd -0x1e0(%rbp), %xmm0
leaq -0x1f0(%rbp), %rax
movq %rax, -0x8(%rbp)
movapd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movsd 0xfbb53(%rip), %xmm0    # 0x111060
subsd -0x1f0(%rbp), %xmm0
movsd -0x1f0(%rbp), %xmm1
mulsd -0x1f0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd 0xfbb1f(%rip), %xmm2    # 0x111050
movsd -0x1f0(%rbp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0xfbae0(%rip), %xmm0    # 0x111040
movsd %xmm0, -0x1f8(%rbp)
movq -0x1d0(%rbp), %rax
orq -0x1e8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x200(%rbp)
movsd -0x1f8(%rbp), %xmm0
mulsd -0x200(%rbp), %xmm0
movsd %xmm0, -0x178(%rbp)
movsd -0x178(%rbp), %xmm0
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop