// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
leaq 0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
fldt 0x10(%rbp)
fstpt -0x10(%rbp)
movl 0x38(%rax), %eax
movl %eax, -0x8c(%rbp)
fldt -0x10(%rbp)
xorl %eax, %eax
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
movb %al, -0x85(%rbp)
jb 0x5a55
jmp 0x5a2c
movq -0x98(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x8(%rcx)
movb %al, -0x85(%rbp)
jne 0x5a55
movq -0x98(%rbp), %rax
cmpl $0x0, 0x10(%rax)
setne %al
movb %al, -0x85(%rbp)
movl -0x8c(%rbp), %edi
movb -0x85(%rbp), %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, %edx
leaq 0x27ed(%rip), %rsi      # 0x825d
callq 0x1060
movq %rax, %rcx
movq -0x98(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl 0x38(%rax), %eax
movl %eax, -0xa0(%rbp)
fldt -0x10(%rbp)
xorl %eax, %eax
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
movb %al, -0x99(%rbp)
jb 0x5ab6
jmp 0x5aa2
movq -0x98(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
movb %al, -0x99(%rbp)
movq -0x98(%rbp), %rcx
movl -0xa0(%rbp), %edi
movb -0x99(%rbp), %al
movzbl %al, %eax
andl $0x1, %eax
movl 0x8(%rcx), %ecx
imull %ecx, %eax
movslq %eax, %rdx
leaq 0x287c(%rip), %rsi      # 0x835b
callq 0x1060
movq %rax, %rdx
movq -0x98(%rbp), %rax
movl -0x14(%rbp), %ecx
addl %edx, %ecx
movl %ecx, -0x14(%rbp)
movl 0x38(%rax), %eax
movl %eax, -0xa8(%rbp)
fldt -0x10(%rbp)
xorl %eax, %eax
fldz
fucompi %st(1), %st
fstp %st(0)
movb %al, -0xa1(%rbp)
jbe 0x5b28
jmp 0x5b14
movq -0x98(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
movb %al, -0xa1(%rbp)
movl -0xa8(%rbp), %edi
movb -0xa1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rdx
leaq 0x2741(%rip), %rsi      # 0x8284
callq 0x1060
movq %rax, %rdx
movq -0x98(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rdx, %rcx
movl %ecx, -0x14(%rbp)
cmpl $0x0, 0xc(%rax)
jne 0x5bdc
movq -0x98(%rbp), %rax
fldt -0x10(%rbp)
fnstcw -0x6a(%rbp)
movzwl -0x6a(%rbp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0x6c(%rbp)
fldcw -0x6c(%rbp)
fld %st(0)
fistpll -0x28(%rbp)
fldcw -0x6a(%rbp)
movq -0x28(%rbp), %rdi
fnstcw -0x6e(%rbp)
movzwl -0x6e(%rbp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0x70(%rbp)
fldcw -0x70(%rbp)
fistpll -0x30(%rbp)
fldcw -0x6e(%rbp)
movl -0x30(%rbp), %ecx
movl %ecx, %ecx
movl %ecx, %esi
movl 0x18(%rax), %edx
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x2c(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x2c(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x5480
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x98(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0xb0(%rbp)
fldt -0x10(%rbp)
xorl %eax, %eax
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
movb %al, -0xa9(%rbp)
jb 0x5c19
jmp 0x5c03
movq -0x98(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0xa9(%rbp)
movq -0x98(%rbp), %rcx
movl -0xb0(%rbp), %edi
movb -0xa9(%rbp), %al
movzbl %al, %eax
andl $0x1, %eax
movl 0x8(%rcx), %ecx
imull %ecx, %eax
movslq %eax, %rdx
leaq 0x2719(%rip), %rsi      # 0x835b
callq 0x1060
movq %rax, %rdx
movq -0x98(%rbp), %rax
movl -0x14(%rbp), %ecx
addl %edx, %ecx
movl %ecx, -0x14(%rbp)
movl 0x38(%rax), %eax
movl %eax, -0xb8(%rbp)
fldt -0x10(%rbp)
xorl %eax, %eax
fldz
fucompi %st(1), %st
fstp %st(0)
movb %al, -0xb1(%rbp)
jbe 0x5c8d
jmp 0x5c77
movq -0x98(%rbp), %rax
cmpl $0x0, 0x4(%rax)
setne %al
xorb $-0x1, %al
movb %al, -0xb1(%rbp)
movl -0xb8(%rbp), %edi
movb -0xb1(%rbp), %al
movzbl %al, %eax
andl $0x1, %eax
movl %eax, %edx
leaq 0x25dc(%rip), %rsi      # 0x8284
callq 0x1060
movq %rax, %rcx
movl -0x14(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
fldt -0x10(%rbp)
fnstcw -0x72(%rbp)
movzwl -0x72(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x74(%rbp)
fldcw -0x74(%rbp)
fistpll -0x58(%rbp)
fldcw -0x72(%rbp)
movq -0x58(%rbp), %rdi
callq 0x6ac0
movq %rax, %rdi
movq -0x98(%rbp), %rax
movl 0x38(%rax), %esi
callq 0x69f0
movl %eax, %ecx
movl -0x14(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
fldt -0x10(%rbp)
fnstcw -0x76(%rbp)
movzwl -0x76(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x78(%rbp)
fldcw -0x78(%rbp)
fistpll -0x50(%rbp)
fldcw -0x76(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x20(%rbp)
fldt -0x10(%rbp)
fnstcw -0x7a(%rbp)
movzwl -0x7a(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x7c(%rbp)
fldcw -0x7c(%rbp)
fistpll -0x48(%rbp)
fldcw -0x7a(%rbp)
movq -0x48(%rbp), %rdi
callq 0x6ac0
movq %rax, -0x40(%rbp)
fildll -0x40(%rbp)
fstpt -0x10(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6ac0
movq %rax, %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x38(%rbp)
fildll -0x38(%rbp)
fldt -0x10(%rbp)
fsubp %st, %st(1)
fstpt -0x10(%rbp)
cmpl $0x0, 0x18(%rax)
jne 0x5d80
movq -0x98(%rbp), %rax
cmpl $0x0, (%rax)
je 0x5da8
movq -0x98(%rbp), %rax
movl 0x38(%rax), %edi
leaq 0x2355(%rip), %rsi      # 0x80e6
movl $0x1, %edx
callq 0x1060
movq %rax, %rcx
movslq -0x14(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x14(%rbp)
fldt -0x10(%rbp)
movq %rsp, %rax
fstpt (%rax)
movsd 0x25d0(%rip), %xmm0     # 0x8388
movsd %xmm0, -0xd0(%rbp)
callq 0x5840
movq -0x98(%rbp), %rax
fld1
faddp %st, %st(1)
movl 0x18(%rax), %edi
movl 0x38(%rax), %esi
movq %rsp, %rax
fstpt (%rax)
callq 0x58f0
movsd -0xd0(%rbp), %xmm0
movl %eax, %ecx
movl -0x14(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x14(%rbp)
fldt -0x10(%rbp)
movq %rsp, %rax
fstpt (%rax)
callq 0x5840
movq -0x98(%rbp), %rax
fstpt -0xc4(%rbp)
movl 0x18(%rax), %esi
movl $0xa, %edi
callq 0x59b0
fldt -0xc4(%rbp)
movl %eax, -0x60(%rbp)
fildl -0x60(%rbp)
fmulp %st, %st(1)
fstpt -0x10(%rbp)
fldt -0x10(%rbp)
flds 0x256d(%rip)            # 0x83a0
fmulp %st, %st(1)
fnstcw -0x7e(%rbp)
movzwl -0x7e(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x80(%rbp)
fldcw -0x80(%rbp)
fistpl -0x5c(%rbp)
fldcw -0x7e(%rbp)
movl -0x5c(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x5, %edx
jl 0x5e68
fldt -0x10(%rbp)
fld1
faddp %st, %st(1)
fstpt -0x10(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x5ecb
fldt -0x10(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x5e86
jp 0x5e86
jmp 0x5ecb
movq -0x98(%rbp), %rax
fldt -0x10(%rbp)
fnstcw -0x82(%rbp)
movzwl -0x82(%rbp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0x84(%rbp)
fldcw -0x84(%rbp)
fistpll -0x68(%rbp)
fldcw -0x82(%rbp)
movq -0x68(%rbp), %rdi
movl 0x38(%rax), %esi
callq 0x69f0
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x98(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x5f1a
movq -0x98(%rbp), %rax
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl %ecx, %ecx
movl %ecx, %esi
movl 0x18(%rax), %edx
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x2c(%rax), %xmm3
movq %rsp, %rax
movups %xmm3, 0x2c(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0x5480
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)