// File: /workspace/github_c_makefile_star2_O2/rpeepz[P]ft_ssl/libft/srcs/ft_sprintf/x_to_buf.c
// Function: x_to_buf
int				x_to_buf(char *buf, t_mod modifiers, va_list ap, int i)
{
	int64_t	num;
	char	*str;
	int		len;

	len = -1;
	num = convert_length(modifiers.length, ap);
	if (modifiers.length == 'l' || modifiers.length / 2 == 'l' ||
		modifiers.length == 'z')
		str = num_string_u_base(num, 16);
	else
		str = ft_uitoa_base(num, 16);
	if (i == 8)
		while (str[++len])
			str[len] = ft_tolower(str[len]);
	str[0] == '0' && modifiers.prcsn == 0 ? str[0] = '\0' : 0;
	if (modifiers.fl.minus == 1)
		left_justify(buf, str, modifiers, i);
	else
		right_justify(buf, str, modifiers, i);
	free(str);
	return (ft_strlen(buf));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %r13d
movq %rdi, %r14
movl 0xbc(%rsp), %eax
cmpl $0x68, %eax
jne 0xa51e
movl (%rsi), %ecx
cmpq $0x28, %rcx
ja 0xa541
movq %rcx, %rax
addq 0x10(%rsi), %rax
addl $0x8, %ecx
movl %ecx, (%rsi)
jmp 0xa54d
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0xd0, %ecx
jne 0xa55e
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xa59f
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xa5ab
movq 0x8(%rsi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsi)
movswq (%rax), %rdi
pushq $0x10
popq %rsi
callq 0xa9a7
jmp 0xa619
leal -0xd8(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa589
cmpl $0x7a, %eax
je 0xa589
cmpl $0x6c, %eax
jne 0xa5c2
movl (%rsi), %ecx
cmpq $0x28, %rcx
ja 0xa5d8
movq %rcx, %rax
addq 0x10(%rsi), %rax
addl $0x8, %ecx
movl %ecx, (%rsi)
jmp 0xa5e4
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xa5b1
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xa5bd
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movsbq (%rcx), %rdi
jmp 0xa5f8
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movq (%rcx), %rdi
jmp 0xa5f8
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xa5e9
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xa5f5
movq 0x8(%rsi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsi)
movq (%rax), %rdi
jmp 0xa611
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movslq (%rcx), %rdi
leal -0xd8(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa611
cmpl $0x7a, %eax
je 0xa611
cmpl $0x6c, %eax
jne 0xa551
pushq $0x10
popq %rsi
callq 0x78cd
movq %rax, %r15
leaq 0xa0(%rsp), %r12
cmpl $0x8, %r13d
jne 0xa640
movq %r15, %rbx
movsbl (%rbx), %edi
testl %edi, %edi
je 0xa640
callq 0x6638
movb %al, (%rbx)
incq %rbx
jmp 0xa62d
cmpb $0x30, (%r15)
sete %al
movl 0x18(%r12), %ebp
testl %ebp, %ebp
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xa65c
movb $0x0, (%r15)
cmpl $0x1, 0x8(%r12)
jne 0xa6d9
movq %r14, 0x28(%rsp)
movl 0x14(%r12), %r14d
movl 0x4(%r12), %r12d
movq %r15, %rdi
callq 0x739e
movq %r15, %rcx
movq %rax, %r15
xorl %ebx, %ebx
testl %r12d, %r12d
movq %rcx, 0x38(%rsp)
je 0xa795
movzbl (%rcx), %eax
testl %eax, %eax
je 0xa795
movq 0x28(%rsp), %r12
cmpl $0x30, %eax
je 0xa79a
cmpl $0x8, %r13d
leaq 0x22a6(%rip), %rax      # 0xc95b
leaq 0x22ad(%rip), %rsi      # 0xc969
cmoveq %rax, %rsi
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x7190
leaq 0x2(%rbx), %r12
pushq $0x2
popq %rbx
jmp 0xa79a
movl 0x20(%r12), %eax
movl %eax, 0x60(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movaps %xmm1, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %r15, %rbp
movq %r15, %rdi
callq 0x739e
movq %rax, %r15
cmpl $0x0, 0x44(%rsp)
je 0xa71d
movzbl (%rbp), %eax
testl %eax, %eax
je 0xa71d
cmpl $0x30, %eax
jne 0xa821
movq %r14, %rdi
callq 0x739e
leaq (%rax,%r14), %rdi
movl 0x60(%rsp), %eax
movl %eax, 0x20(%rsp)
movaps 0x40(%rsp), %xmm0
movaps 0x50(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %r15d, %esi
callq 0xa8bd
movl 0x58(%rsp), %ebx
cmpl %r15d, %ebx
jle 0xa779
leaq 0x1660(%rip), %r12      # 0xbdbc
cmpl %r15d, %ebx
jle 0xa779
decl %ebx
movq %r14, %rdi
callq 0x739e
leaq (%rax,%r14), %rdi
movq %r12, %rsi
callq 0x7190
jmp 0xa75c
movq %r14, %rdi
callq 0x739e
leaq (%rax,%r14), %rdi
movslq %r15d, %rdx
movq %rbp, %rbx
movq %rbp, %rsi
callq 0x71a9
jmp 0xa802
movq 0x28(%rsp), %r12
leaq 0x161b(%rip), %r13      # 0xbdbc
cmpl %r15d, %ebp
jle 0xa7ba
decl %ebp
movq %r12, %rdi
movq %r13, %rsi
callq 0x7190
incq %r12
incl %ebx
jmp 0xa7a1
leaq 0x40(%rsp), %r13
movq %r12, (%r13)
leaq 0x34(%rsp), %r12
movl %ebx, (%r12)
movq %r13, %rdi
movq 0x38(%rsp), %rsi
movq %r12, %rdx
movl %r15d, %ecx
callq 0x99c8
pushq $0x20
popq %rbp
cmpl %r14d, 0x34(%rsp)
jge 0xa7f8
movq %r13, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x999c
jmp 0xa7e2
movq 0x28(%rsp), %r14
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x739e
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x50(%rsp)
je 0xa84d
cmpl $-0x1, 0x58(%rsp)
jne 0xa84d
cmpl $0x8, %r13d
leaq 0x2121(%rip), %rax      # 0xc95b
leaq 0x2128(%rip), %rsi      # 0xc969
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x7190
movq %r14, %rdi
callq 0x739e
leaq (%rax,%r14), %rdi
movl 0x20(%r12), %eax
movl %eax, 0x20(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %r15d, %esi
callq 0xa8bd
cmpl $0x0, 0x50(%rsp)
sete %al
movl 0x58(%rsp), %ebx
testl %ebx, %ebx
setns %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0xa750
cmpl $0x8, %r13d
leaq 0x20b6(%rip), %rax      # 0xc95b
leaq 0x20bd(%rip), %rsi      # 0xc969
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x7190
jmp 0xa750