// File: /workspace/github_c_makefile_star2_O0/AndreIglesias[P]quick_ls/libft/libstd/depo/.././src//c/stdio/ft_printf/aux/print_address.c
// Function: ft_width
int	ft_width(t_flags flags, int size, int g)
{
	int	nb;
	int	mprec;

	nb = 0;
	mprec = size;
	if (flags.precision > size)
		mprec = flags.precision;
	if (!flags.minus && !size)
	{
		nb += ft_repet_fd(' ', flags.width - 3 + g - flags.precision, flags.fd);
		return (nb + write(flags.fd, "0x0", 3 - g) + ft_repet_fd('0',
				flags.precision - 1, flags.fd));
	}
	if (!flags.minus)
		return (ft_repet_fd(' ', flags.width - mprec
				- flags.space - flags.plus - 2, flags.fd));
	if (!size)
	{
		nb += write(flags.fd, "0x0", 3 - g)
			+ ft_repet_fd('0', flags.precision - 1, flags.fd);
		return (nb + ft_repet_fd(' ', flags.width - 3 + g - flags.precision,
				flags.fd));
	}
	return (nb + ft_repet_fd(' ', flags.width - mprec
			- flags.space - flags.plus - 2, flags.fd));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x8(%rbp), %ecx
movl %ecx, -0x14(%rbp)
movl 0x18(%rax), %eax
cmpl -0x8(%rbp), %eax
jle 0x6505
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x65a1
cmpl $0x0, -0x8(%rbp)
jne 0x65a1
movq -0x20(%rbp), %rax
movl 0x14(%rax), %esi
subl $0x3, %esi
addl -0xc(%rbp), %esi
subl 0x18(%rax), %esi
movl 0x38(%rax), %edx
movl $0x20, %edi
callq 0x6a70
movl %eax, %ecx
movq -0x20(%rbp), %rax
addl -0x10(%rbp), %ecx
movl %ecx, -0x10(%rbp)
movslq -0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x38(%rax), %edi
movl $0x3, %eax
subl -0xc(%rbp), %eax
movslq %eax, %rdx
leaq 0x1e4a(%rip), %rsi      # 0x83ad
callq 0x1060
movq -0x30(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
addq %rdx, %rcx
movq %rcx, -0x28(%rbp)
movl 0x18(%rax), %esi
subl $0x1, %esi
movl 0x38(%rax), %edx
movl $0x30, %edi
callq 0x6a70
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movl %eax, -0x4(%rbp)
jmp 0x668e
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x65d3
movq -0x20(%rbp), %rax
movl 0x14(%rax), %esi
subl -0x14(%rbp), %esi
subl 0x10(%rax), %esi
subl 0x8(%rax), %esi
subl $0x2, %esi
movl 0x38(%rax), %edx
movl $0x20, %edi
callq 0x6a70
movl %eax, -0x4(%rbp)
jmp 0x668e
cmpl $0x0, -0x8(%rbp)
jne 0x665e
movq -0x20(%rbp), %rax
movl 0x38(%rax), %edi
movl $0x3, %eax
subl -0xc(%rbp), %eax
movslq %eax, %rdx
leaq 0x1db7(%rip), %rsi      # 0x83ad
callq 0x1060
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x40(%rbp)
movl 0x18(%rax), %esi
subl $0x1, %esi
movl 0x38(%rax), %edx
movl $0x30, %edi
callq 0x6a70
movq -0x40(%rbp), %rdx
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rdx
movslq -0x10(%rbp), %rcx
addq %rdx, %rcx
movl %ecx, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movl %ecx, -0x34(%rbp)
movl 0x14(%rax), %esi
subl $0x3, %esi
addl -0xc(%rbp), %esi
subl 0x18(%rax), %esi
movl 0x38(%rax), %edx
movl $0x20, %edi
callq 0x6a70
movl %eax, %ecx
movl -0x34(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x668e
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, -0x44(%rbp)
movl 0x14(%rax), %esi
subl -0x14(%rbp), %esi
subl 0x10(%rax), %esi
subl 0x8(%rax), %esi
subl $0x2, %esi
movl 0x38(%rax), %edx
movl $0x20, %edi
callq 0x6a70
movl %eax, %ecx
movl -0x44(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)