// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/libft/srcs/ft_printf/convert_p.c
// Function: right_justify
static	int		right_justify(t_mods mod, char *num, int nbyte)
{
	int		len;

	len = (int)ft_strlen(num);
	if ((mod.fl.fzero && mod.width > 14) || mod.prcsn > len ||
		(mod.prcsn > 0 && num[2] == '0'))
	{
		nbyte += (int)write(1, "0x", 2);
		len -= 2;
		num += 2;
		nbyte = pad_width(mod, len, nbyte, mod.fl.fplus);
		if (mod.prcsn > len - 2)
			while ((mod.prcsn--) - len > 0)
				nbyte += (int)write(1, "0", 1);
	}
	else
	{
		nbyte = pad_width(mod, len, nbyte, mod.fl.fplus);
		if (mod.prcsn > len)
			while ((mod.prcsn--) - len > 0)
				nbyte += (int)write(1, "0", 1);
	}
	if (mod.prcsn == 0 && num[2] == '0')
		return (nbyte += (int)write(1, num, len - 1));
	return (nbyte += (int)write(1, num, len));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0xbf10
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, -0x18(%rbp)
cmpl $0x0, 0x10(%rax)
je 0xecca
movq -0x20(%rbp), %rax
cmpl $0xe, 0x14(%rax)
jg 0xecf5
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x18(%rbp), %eax
jg 0xecf5
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0xedb1
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x30, %eax
jne 0xedb1
movl $0x1, %edi
leaq 0x575a(%rip), %rsi      # 0x1445b
movl $0x2, %edx
callq 0x1050
movq %rax, %rcx
movq -0x20(%rbp), %rax
addl -0x14(%rbp), %ecx
movl %ecx, -0x14(%rbp)
movl -0x18(%rbp), %ecx
subl $0x2, %ecx
movl %ecx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
addq $0x2, %rcx
movq %rcx, -0x10(%rbp)
movl -0x18(%rbp), %edi
movl -0x14(%rbp), %esi
movl 0xc(%rax), %edx
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 0xee90
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl 0x18(%rax), %eax
movl -0x18(%rbp), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jle 0xedac
jmp 0xed75
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x18(%rcx)
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
jle 0xedaa
movl $0x1, %edi
leaq 0x4fcd(%rip), %rsi      # 0x13d65
movl $0x1, %edx
callq 0x1050
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xed75
jmp 0xedac
jmp 0xee31
movq -0x20(%rbp), %rax
movl -0x18(%rbp), %edi
movl -0x14(%rbp), %esi
movl 0xc(%rax), %edx
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 0xee90
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, -0x14(%rbp)
movl 0x18(%rax), %eax
cmpl -0x18(%rbp), %eax
jle 0xee2f
jmp 0xedf8
movq -0x20(%rbp), %rcx
movl 0x18(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x18(%rcx)
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
jle 0xee2d
movl $0x1, %edi
leaq 0x4f4a(%rip), %rsi      # 0x13d65
movl $0x1, %edx
callq 0x1050
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0xedf8
jmp 0xee2f
jmp 0xee31
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0xee6a
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
cmpl $0x30, %eax
jne 0xee6a
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rdx
movl $0x1, %edi
callq 0x1050
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl %eax, -0x4(%rbp)
jmp 0xee85
movq -0x10(%rbp), %rsi
movslq -0x18(%rbp), %rdx
movl $0x1, %edi
callq 0x1050
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop