// File: /workspace/github_c_makefile_star2_O1/AndreIglesias[P]quick_ls/libft/libstd/depo/.././src//c/stdio/ft_printf/aux/print_address.c
// Function: print_address
int	print_address(unsigned long p, t_flags flags, int size, int npre)
{
	int	i;
	int	nb;
	int	z;

	i = (sizeof(p) << 3) - 20;
	size = a_size(i, p, &z);
	nb = write(flags.fd, " ", 1 * (flags.space && size));
	if (!flags.minus && (!(flags.zero && !flags.precision) || !size))
		nb += ft_width(flags, size, npre);
	nb += write(flags.fd, "+", 1 * (flags.plus && size));
	if (size)
		nb += write(flags.fd, "0x", 2);
	if (!flags.minus && (flags.zero && !flags.precision) && size)
		nb += ft_zero(flags, size);
	if (size)
		nb += ft_repet_fd('0', flags.precision - size, flags.fd);
	while (size && i >= 0)
	{
		if (z-- <= 0)
			nb += ft_putchar_fd(hex_digit((p >> i) & 0xf), flags.fd);
		i -= 4;
	}
	if (flags.minus)
		nb += ft_width(flags, size, npre);
	return (nb);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %ebx
movq %rdi, %r14
movl $0x2c, %ecx
xorl %r15d, %r15d
leaq 0xa0(%rsp), %r12
xorl %eax, %eax
movq %r14, %rdx
shrq %cl, %rdx
testb $0xf, %dl
je 0x469d
testl %eax, %eax
je 0x46a1
testl %r15d, %r15d
cmovel %eax, %r15d
jmp 0x46a9
incl %eax
jmp 0x46a9
xorl %eax, %eax
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
addq $-0x4, %rcx
cmpq $-0x4, %rcx
jne 0x4685
xorl %eax, %eax
testq %r14, %r14
movl $0xc, %ebp
cmovel %eax, %ebp
movl 0x10(%r12), %eax
movl 0x38(%r12), %edi
movq %rax, 0x60(%rsp)
testl %eax, %eax
setne %al
movl %ebp, %ecx
subl %r15d, %ecx
movl %ecx, 0x50(%rsp)
setne %cl
andb %al, %cl
movzbl %cl, %edx
leaq 0xb9d(%rip), %rsi       # 0x5289
movl %edi, 0x4c(%rsp)
callq 0x1060
movq %rax, %r13
movl 0xc(%r12), %eax
movl %eax, 0x54(%rsp)
testl %eax, %eax
movl %ebx, 0x5c(%rsp)
jne 0x4756
cmpl $0x0, 0x4(%r12)
je 0x471e
cmpl $0x0, 0x18(%r12)
jne 0x471e
cmpl %r15d, %ebp
jne 0x4756
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups 0x2c(%r12), %xmm3
movups %xmm3, 0x2c(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl 0x50(%rsp), %edi
movl %ebx, %esi
callq 0x4515
addl %eax, %r13d
movl 0x4c(%rsp), %ebx
cmpl %r15d, %ebp
setne %al
movl 0x8(%r12), %ecx
movl %ecx, 0x58(%rsp)
testl %ecx, %ecx
setne %cl
andb %al, %cl
movzbl %cl, %edx
leaq 0xc0d(%rip), %rsi       # 0x5387
movl %ebx, %edi
callq 0x1060
movq %rax, %r12
addl %r13d, %r12d
cmpl %r15d, %ebp
je 0x47a2
leaq 0xc4c(%rip), %rsi       # 0x53df
movl $0x2, %edx
movl %ebx, %edi
callq 0x1060
addl %eax, %r12d
leaq 0xa0(%rsp), %rax
movl 0x18(%rax), %r13d
cmpl $0x0, 0x54(%rsp)
jne 0x47fa
cmpl $0x0, 0x4(%rax)
je 0x47fa
testl %r13d, %r13d
jne 0x47fa
cmpl %r15d, %ebp
je 0x47fa
movl 0x14(%rax), %eax
movl 0x50(%rsp), %ecx
cmpl %ecx, %r13d
cmovgl %r13d, %ecx
movq 0x60(%rsp), %rdx
addl 0x58(%rsp), %edx
addl %ecx, %edx
negl %edx
leal (%rax,%rdx), %esi
addl $-0x2, %esi
movl $0x30, %edi
movl 0x4c(%rsp), %edx
callq 0x4988
addl %r12d, %eax
movl %eax, %r12d
cmpl %r15d, %ebp
je 0x481b
subl 0x50(%rsp), %r13d
movl $0x30, %edi
movl %r13d, %esi
movl 0x4c(%rsp), %edx
callq 0x4988
addl %r12d, %eax
movl %eax, %r12d
cmpl %r15d, %ebp
je 0x486d
movl $0x2c, %r13d
movl %r15d, %ebx
testl %ebx, %ebx
jg 0x485a
movq %r14, %rax
movl %r13d, %ecx
shrq %cl, %rax
andl $0xf, %eax
leal 0x30(%rax), %ecx
leal 0x57(%rax), %edx
cmpl $0xa, %eax
movzbl %cl, %eax
movzbl %dl, %ecx
cmovbl %eax, %ecx
movzbl %cl, %edi
movl 0x4c(%rsp), %esi
callq 0x48f8
addl %eax, %r12d
cmpl %r15d, %ebp
je 0x486d
leaq -0x4(%r13), %rax
decl %ebx
testq %r13, %r13
movq %rax, %r13
jne 0x4829
cmpl $0x0, 0x54(%rsp)
je 0x48b1
leaq 0xa0(%rsp), %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups 0x2c(%rax), %xmm3
movups %xmm3, 0x2c(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl 0x50(%rsp), %edi
movl 0x5c(%rsp), %esi
callq 0x4515
addl %r12d, %eax
movl %eax, %r12d
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)