// File: /workspace/github_c_makefile_star2_O0/AugustinLopez[P]Fancy_Ft_Malloc/minilibft/printf/pf_string.c
// Function: pf_putwstr
void				pf_putwstr(t_printf *pf)
{
	wchar_t	*str;
	int		clen;

	if (!(str = va_arg(pf->ap, wchar_t *)))
	{
		pf_putnull(pf);
		return ;
	}
	pf->printed = (int)(ft_wstrlen((unsigned *)str));
	if (pf->flag & F_DOT)
		pf->printed = pf->printed > pf->precision ? pf->precision : pf->printed;
	pf->printed = pf->printed < 0 ? 0 : pf->printed;
	if ((pf->padding = (pf->length - pf->printed)) < 0)
		pf->padding = 0;
	pf->flag &= (pf->length > pf->precision) ? ~F_DOT : pf->flag | F_DOT;
	pf_padding(pf, 0);
	clen = 0;
	while ((*str && (pf->printed -= clen) > 0))
	{
		clen = ft_wcharlen(*str);
		pf_lenwchar(pf, *str++, pf->printed, clen);
	}
	pf_padding(pf, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x68, %rcx
movq %rcx, -0x20(%rbp)
movl 0x68(%rax), %eax
movl %eax, -0x18(%rbp)
cmpl $0x28, %eax
ja 0x8d8f
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x8da6
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x8dc5
movq -0x8(%rbp), %rdi
callq 0x8f30
jmp 0x8f27
movq -0x10(%rbp), %rdi
callq 0x3630
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
je 0x8e1b
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x8e07
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x8e11
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jge 0x8e2c
xorl %eax, %eax
movl %eax, -0x30(%rbp)
jmp 0x8e36
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x18(%rcx), %eax
movq -0x8(%rbp), %rcx
movl %eax, 0x14(%rcx)
cmpl $0x0, %eax
jge 0x8e65
movq -0x8(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x8e7f
movl $0xffdfffff, %eax       # imm = 0xFFDFFFFF
movl %eax, -0x34(%rbp)
jmp 0x8e91
movq -0x8(%rbp), %rax
movl 0x90(%rax), %eax
orl $0x200000, %eax         # imm = 0x200000
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
andl 0x90(%rax), %ecx
movl %ecx, 0x90(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3430
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x35(%rbp)
je 0x8edc
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %eax
subl %edx, %eax
movl %eax, 0x18(%rcx)
cmpl $0x0, %eax
setg %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x8ee5
jmp 0x8f19
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x32f0
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl (%rax), %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movl -0x14(%rbp), %ecx
callq 0x8fe0
jmp 0x8eb6
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3430
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)