// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/libft/srcs/ft_printf/convert_s.c
// Function: convert_s
int			convert_s(t_mods modifiers, va_list ap)
{
	char	*s;
	char	*s2;
	int		nbyte;
	int		len;

	s = va_arg(ap, char *);
	!s ? s = "(null)" : 0;
	nbyte = 0;
	if (modifiers.prcsn >= 0 && modifiers.prcsn < (int)ft_strlen(s))
		s2 = ft_strndup(s, modifiers.prcsn);
	else
		s2 = ft_strdup(s);
	if ((len = ft_strlen(s2)) && modifiers.fl.minus == 1)
	{
		if (modifiers.width <= len)
			nbyte += (int)write(1, s2, len);
		else
			nbyte += left_justify(modifiers, s2, len);
		return ((ft_pipewrench("-s", &s2) + nbyte) - 1);
	}
	if (modifiers.width > len)
		nbyte += right_justify(modifiers, s2, len);
	else
		nbyte += (int)write(1, s2, len);
	return ((ft_pipewrench("-s", &s2) + nbyte) - 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x28, %eax
ja 0xefdf
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x48(%rbp)
jmp 0xeff6
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xf015
leaq 0x5453(%rip), %rax      # 0x14462
movq %rax, -0x18(%rbp)
jmp 0xf017
jmp 0xf017
movq -0x40(%rbp), %rax
movl $0x0, -0x24(%rbp)
cmpl $0x0, 0x18(%rax)
jl 0xf05c
movq -0x40(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x18(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl %ecx, %eax
jge 0xf05c
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rdi
movslq 0x18(%rax), %rsi
callq 0xc280
movq %rax, -0x20(%rbp)
jmp 0xf069
movq -0x18(%rbp), %rdi
callq 0xc1d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xbf10
movl %eax, -0x28(%rbp)
cmpl $0x0, %eax
je 0xf103
movq -0x40(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0xf103
movq -0x40(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0x28(%rbp), %eax
jg 0xf0ae
movq -0x20(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movl $0x1, %edi
callq 0x1050
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xf0e6
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xf190
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x4c65(%rip), %rdi      # 0x13d52
leaq -0x20(%rbp), %rsi
movb $0x0, %al
callq 0xa8d0
addl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xf17c
movq -0x40(%rbp), %rax
movl 0x14(%rax), %eax
cmpl -0x28(%rbp), %eax
jle 0xf149
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xf200
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0xf161
movq -0x20(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movl $0x1, %edi
callq 0x1050
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x4bea(%rip), %rdi      # 0x13d52
leaq -0x20(%rbp), %rsi
movb $0x0, %al
callq 0xa8d0
addl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)