// File: /workspace/github_c_makefile_star2_O3/AndreIglesias[P]quick_ls/libft/libstd/depo/.././src//c/stdio/ft_printf/aux/ft_putdbl.c
// Function: ft_putdbl
int	ft_putdbl(long double d, t_flags flags)
{
	int				nb;
	long long int	a;

	nb = write(flags.fd, " ", (d >= 0 && !flags.plus && flags.space));
	nb += write(flags.fd, "+", (d >= 0 && flags.zero) * flags.plus);
	nb += write(flags.fd, "-", (d < 0 && flags.zero));
	if (!flags.minus)
		nb += ft_putwidth((long long)d, flags, (unsigned)d, flags.precision);
	nb += write(flags.fd, "+", (d >= 0 && !flags.zero) * flags.plus);
	nb += write(flags.fd, "-", (d < 0 && !flags.zero));
	nb += ft_putnbr_max(ft_abs((long long int)d), flags.fd);
	a = (long long int)d;
	d = ft_abs(d);
	d -= (long double)ft_abs(a);
	if (flags.precision != 0 || flags.square)
		nb += write(flags.fd, ".", 1);
	nb += ft_putzeroes(1 + ft_fmod(d, 1), flags.precision, flags.fd);
	d = (ft_fmod(d, 1)) * ft_pow(10, flags.precision);
	if ((int)(d * 10) % 10 >= 5)
		d++;
	if (flags.precision != 0 && d)
		nb += ft_putnbr_max((long long int)d, flags.fd);
	if (flags.minus)
		nb += ft_putwidth(a, flags, (unsigned int)a, flags.precision);
	return (nb);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
fldt 0x100(%rsp)
fld %st(0)
fstpt 0x54(%rsp)
leaq 0x110(%rsp), %r13
movl 0x38(%r13), %ebp
fldz
fld %st(0)
fstpt 0x70(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setae %al
movslq 0x8(%r13), %r14
testq %r14, %r14
sete %cl
cmpl $0x0, 0x10(%r13)
setne %dl
andb %cl, %dl
andb %al, %dl
movzbl %dl, %edx
leaq 0x2382(%rip), %rsi      # 0x6289
movl %ebp, %edi
callq 0x1060
movq %rax, %rbx
movl 0x4(%r13), %ecx
xorl %eax, %eax
movl %ecx, %r12d
testl %ecx, %ecx
movl $0x0, %edx
cmovneq %r14, %rdx
setne %r15b
fldt 0x54(%rsp)
fldt 0x70(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
cmovbq %rax, %rdx
leaq 0x2445(%rip), %rsi      # 0x6387
movl %ebp, %edi
callq 0x1060
addl %eax, %ebx
fldt 0x54(%rsp)
fldt 0x70(%rsp)
fucompi %st(1), %st
fstp %st(0)
seta %al
andb %r15b, %al
movzbl %al, %edx
leaq 0x2349(%rip), %rsi      # 0x62b0
movl %ebp, %edi
callq 0x1060
fldt 0x54(%rsp)
fnstcw 0x52(%rsp)
movzwl 0x52(%rsp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, 0x66(%rsp)
fldcw 0x66(%rsp)
movq %rax, %r15
fld %st(0)
fistpll 0xc0(%rsp)
fldcw 0x52(%rsp)
addl %ebx, %r15d
cmpl $0x0, 0xc(%r13)
movq 0xc0(%rsp), %rbx
je 0x3fb1
movl %r12d, %ecx
jmp 0x4027
fnstcw 0x50(%rsp)
movzwl 0x50(%rsp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, 0x64(%rsp)
fldcw 0x64(%rsp)
fistpll 0xb8(%rsp)
fldcw 0x50(%rsp)
movl 0xb8(%rsp), %esi
movl 0x18(%r13), %edx
movups (%r13), %xmm0
movupd 0x10(%r13), %xmm1
movupd 0x20(%r13), %xmm2
movups 0x2c(%r13), %xmm3
movups %xmm3, 0x2c(%rsp)
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x3a6e
fldt 0x54(%rsp)
addl %r15d, %eax
movl 0x4(%r13), %ecx
movl 0x38(%r13), %ebp
movslq 0x8(%r13), %r14
movl %eax, %r15d
fldz
fucomi %st(1), %st
seta %r12b
xorl %eax, %eax
testl %ecx, %ecx
cmovneq %rax, %r14
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
cmovbq %rax, %r14
leaq 0x233f(%rip), %rsi      # 0x6387
movl %ebp, %edi
movq %r14, %rdx
callq 0x1060
movq %rax, %r14
cmpl $0x0, 0x4(%r13)
movl 0x38(%r13), %edi
sete %al
andb %r12b, %al
movzbl %al, %edx
leaq 0x2242(%rip), %rsi      # 0x62b0
callq 0x1060
movq %rax, %r12
addl %r14d, %r12d
addl %r15d, %r12d
movq %rbx, %rdi
callq 0x4bb0
movl 0x38(%r13), %esi
movq %rax, %rdi
callq 0x4af4
movl %eax, %ebp
addl %r12d, %ebp
movq %rbx, %rdi
callq 0x4bb0
movq %rax, 0xa8(%rsp)
fildll 0xa8(%rsp)
fstpt 0x54(%rsp)
movq %rbx, %rdi
callq 0x4bb0
movq %rax, 0xb0(%rsp)
fildll 0xb0(%rsp)
fldt 0x54(%rsp)
fsubp %st, %st(1)
movl (%r13), %eax
orl 0x18(%r13), %eax
je 0x40f6
movl 0x38(%r13), %edi
leaq 0x2004(%rip), %rsi      # 0x60e6
movl $0x1, %edx
fstpt 0x54(%rsp)
callq 0x1060
fldt 0x54(%rsp)
addl %eax, %ebp
fld %st(0)
fchs
fucomi %st(1), %st
fxch %st(1)
fcmovnbe %st(1), %st
fstp %st(1)
fstl 0xa0(%rsp)
movsd 0xa0(%rsp), %xmm3
ucomisd 0x231e(%rip), %xmm3     # 0x6438
movapd %xmm3, %xmm0
jb 0x413e
movsd 0x2318(%rip), %xmm1     # 0x6440
movsd 0x2308(%rip), %xmm2     # 0x6438
movapd %xmm3, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jae 0x4134
fldz
fucompi %st(1), %st
fstpt 0x54(%rsp)
movapd %xmm3, 0x70(%rsp)
jbe 0x4156
xorpd 0x228a(%rip), %xmm0     # 0x63e0
movsd %xmm0, 0x98(%rsp)
fld1
faddl 0x98(%rsp)
movl 0x18(%r13), %edi
movl 0x38(%r13), %esi
fstpt (%rsp)
callq 0x3d11
movl %eax, %r14d
movapd 0x70(%rsp), %xmm2
ucomisd 0x22af(%rip), %xmm2     # 0x6438
jae 0x4191
fldt 0x54(%rsp)
jmp 0x41af
movsd 0x22a7(%rip), %xmm0     # 0x6440
movsd 0x2297(%rip), %xmm1     # 0x6438
fldt 0x54(%rsp)
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jae 0x41a5
fldz
fucompi %st(1), %st
fstp %st(0)
jbe 0x41bf
xorpd 0x2221(%rip), %xmm2     # 0x63e0
movsd %xmm2, 0x90(%rsp)
fldl 0x90(%rsp)
movl 0x18(%r13), %eax
fld1
testl %eax, %eax
jle 0x428c
fstp %st(0)
leal 0x3(%rax), %ecx
andl $-0x4, %ecx
leal -0x1(%rax), %edx
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movdqa 0x21f7(%rip), %xmm1     # 0x63f0
movl $0x4, %edx
movdqa 0x21fa(%rip), %xmm3     # 0x6400
movdqa %xmm1, %xmm2
pmuludq %xmm3, %xmm1
pshufd $0xe8, %xmm1, %xmm1     # xmm1 = xmm1[0,2,2,3]
pshufd $0xf5, %xmm2, %xmm4     # xmm4 = xmm2[1,1,3,3]
pmuludq %xmm3, %xmm4
pshufd $0xe8, %xmm4, %xmm4     # xmm4 = xmm4[0,2,2,3]
punpckldq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movl %edx, %esi
addl $-0x4, %edx
addl %ecx, %esi
addl $-0x4, %esi
cmpl $0x4, %esi
jne 0x4206
negl %edx
movd %edx, %xmm3
pshufd $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
por 0x21c9(%rip), %xmm3     # 0x6410
movdqa 0x2161(%rip), %xmm4     # 0x63b0
pxor %xmm4, %xmm0
pxor %xmm4, %xmm3
pcmpgtd %xmm0, %xmm3
andpd %xmm3, %xmm2
pandn %xmm1, %xmm3
por %xmm2, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
pshufd $0xff, %xmm3, %xmm1     # xmm1 = xmm3[3,3,3,3]
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
pmuludq %xmm1, %xmm2
pmuludq %xmm3, %xmm0
pmuludq %xmm2, %xmm0
movd %xmm0, 0x6c(%rsp)
fildl 0x6c(%rsp)
fmulp %st, %st(1)
fld %st(0)
fmuls 0x21b2(%rip)            # 0x6448
fnstcw 0x4e(%rsp)
movzwl 0x4e(%rsp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, 0x62(%rsp)
fldcw 0x62(%rsp)
fistpl 0x68(%rsp)
fldcw 0x4e(%rsp)
addl %ebp, %r14d
movslq 0x68(%rsp), %rcx
imulq $0x66666667, %rcx, %rdx # imm = 0x66666667
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x22, %rdx
addl %esi, %edx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %ecx
cmpl $0x5, %ecx
setge %cl
fld1
fadd %st(1), %st
testb %cl, %cl
fxch %st(1)
fcmovne %st(1), %st
fstp %st(1)
testl %eax, %eax
je 0x4333
fldz
fxch %st(1)
fucomi %st(1), %st
fstp %st(1)
jne 0x42fb
jnp 0x4333
fnstcw 0x4c(%rsp)
movzwl 0x4c(%rsp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, 0x60(%rsp)
fldcw 0x60(%rsp)
fistpll 0x88(%rsp)
fldcw 0x4c(%rsp)
movq 0x88(%rsp), %rdi
movl 0x38(%r13), %esi
callq 0x4af4
addl %eax, %r14d
jmp 0x4335
fstp %st(0)
cmpl $0x0, 0xc(%r13)
je 0x437c
movl %ebx, %esi
movl 0x18(%r13), %edx
movdqu (%r13), %xmm0
movdqu 0x10(%r13), %xmm1
movdqu 0x20(%r13), %xmm2
movdqu 0x2c(%r13), %xmm3
movdqu %xmm3, 0x2c(%rsp)
movdqu %xmm2, 0x20(%rsp)
movdqu %xmm1, 0x10(%rsp)
movdqu %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x3a6e
addl %eax, %r14d
movl %r14d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)