// File: /workspace/github_c_makefile_star2_O0/AugustinLopez[P]Fancy_Ft_Malloc/minilibft/printf/pf_double.c
// Function: pf_load_string
static inline void	pf_load_string(t_printf *pf, char **str)
{
	double		x;
	long double	xx;
	int			dot;

	pf->precision = !(pf->flag & F_DOT) ? 6 : pf->precision;
	if (pf->flag & F_LDBL)
	{
		xx = va_arg(pf->ap, long double);
		*str = ft_ldbltoa((xx < 0 ? -xx : xx), pf->precision, pf->flag);
		pf->flag |= xx < 0 ? F_NEGATIF : 0;
	}
	else
	{
		x = va_arg(pf->ap, double);
		*str = ft_dbltoa((x < 0 ? -x : x), pf->precision, pf->flag);
		pf->flag |= x < 0 ? F_NEGATIF : 0;
	}
	dot = ft_strchri((const char *)(*str), '.');
	pf->printed = dot + ft_strlen(*str + dot);
	pf->precision = dot ? dot + pf->precision : pf->printed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
jne 0x9591
movl $0x6, %eax
movl %eax, -0x38(%rbp)
jmp 0x959b
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
je 0x9648
movq -0x8(%rbp), %rcx
movq 0x70(%rcx), %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, 0x70(%rcx)
fldt (%rax)
fstpt -0x30(%rbp)
fldt -0x30(%rbp)
fldz
fucompi %st(1), %st
fstp %st(0)
jbe 0x95f4
jmp 0x95ea
fldt -0x30(%rbp)
fchs
fstpt -0x44(%rbp)
jmp 0x95fa
fldt -0x30(%rbp)
fstpt -0x44(%rbp)
fldt -0x44(%rbp)
xorl %eax, %eax
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rdi
movl 0x90(%rax), %esi
movq %rsp, %rax
fstpt (%rax)
callq 0x3640
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
fldt -0x30(%rbp)
fldz
fucompi %st(1), %st
fstp %st(0)
seta %al
movzbl %al, %ecx
shll $0x1f, %ecx
movq -0x8(%rbp), %rax
orl 0x90(%rax), %ecx
movl %ecx, 0x90(%rax)
jmp 0x9730
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x58(%rbp)
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl 0x6c(%rax), %eax
movl %eax, -0x48(%rbp)
cmpl $0xa0, %eax
ja 0x9689
movq -0x50(%rbp), %rcx
movl -0x48(%rbp), %edx
movq -0x58(%rbp), %rsi
movslq %edx, %rax
addq 0x10(%rsi), %rax
addl $0x10, %edx
movl %edx, (%rcx)
movq %rax, -0x60(%rbp)
jmp 0x96a0
movq -0x58(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x18(%rbp), %xmm0
jbe 0x96da
movsd -0x18(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0x96e4
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x90(%rax), %esi
callq 0x30b0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movsd -0x18(%rbp), %xmm1
xorps %xmm0, %xmm0
xorl %ecx, %ecx
movl $0x80000000, %eax       # imm = 0x80000000
ucomisd %xmm1, %xmm0
cmoval %eax, %ecx
movq -0x8(%rbp), %rax
orl 0x90(%rax), %ecx
movl %ecx, 0x90(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl $0x2e, %esi
callq 0x35b0
movl %eax, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movslq -0x34(%rbp), %rax
addq %rax, %rdi
callq 0x3140
movq %rax, %rcx
movq -0x70(%rbp), %rax
addq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
cmpl $0x0, -0x34(%rbp)
je 0x9787
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x8(%rcx), %eax
movl %eax, -0x74(%rbp)
jmp 0x9791
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)