// File: /workspace/github_c_makefile_star2_O3/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 $0x78, %rsp
movl %edx, %r13d
movq %rdi, %rbx
movl 0xcc(%rsp), %eax
cmpl $0x68, %eax
jne 0xb40a
movl (%rsi), %ecx
cmpq $0x28, %rcx
ja 0xb42d
movq %rcx, %rax
addq 0x10(%rsi), %rax
addl $0x8, %ecx
movl %ecx, (%rsi)
jmp 0xb439
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0xd0, %ecx
jne 0xb44c
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xb48d
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xb499
movq 0x8(%rsi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsi)
movswq (%rax), %rdi
movl $0x10, %esi
callq 0xb8b7
jmp 0xb509
leal -0xd8(%rax), %ecx
cmpl $0x2, %ecx
jb 0xb477
cmpl $0x7a, %eax
je 0xb477
cmpl $0x6c, %eax
jne 0xb4b0
movl (%rsi), %ecx
cmpq $0x28, %rcx
ja 0xb4c6
movq %rcx, %rax
addq 0x10(%rsi), %rax
addl $0x8, %ecx
movl %ecx, (%rsi)
jmp 0xb4d2
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xb49f
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xb4ab
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movsbq (%rcx), %rdi
jmp 0xb4e6
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movq (%rcx), %rdi
jmp 0xb4e6
movl (%rsi), %edx
cmpq $0x28, %rdx
ja 0xb4d7
movq %rdx, %rcx
addq 0x10(%rsi), %rcx
addl $0x8, %edx
movl %edx, (%rsi)
jmp 0xb4e3
movq 0x8(%rsi), %rax
leaq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsi)
movq (%rax), %rdi
jmp 0xb4ff
movq 0x8(%rsi), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rsi)
movslq (%rcx), %rdi
leal -0xd8(%rax), %ecx
cmpl $0x2, %ecx
jb 0xb4ff
cmpl $0x7a, %eax
je 0xb4ff
cmpl $0x6c, %eax
jne 0xb43d
movl $0x10, %esi
callq 0x866e
movq %rax, %r15
leaq 0xb0(%rsp), %r12
movb (%rax), %al
cmpl $0x8, %r13d
jne 0xb53d
testb %al, %al
je 0xb55d
leaq 0x1(%r15), %r14
movsbl %al, %edi
callq 0x725c
movb %al, -0x1(%r14)
movb (%r14), %al
incq %r14
testb %al, %al
jne 0xb524
movb (%r15), %al
cmpb $0x30, %al
sete %al
movl 0x18(%r12), %r14d
testl %r14d, %r14d
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xb562
movb $0x0, (%r15)
xorl %r14d, %r14d
jmp 0xb562
movl 0x18(%r12), %r14d
cmpl $0x1, 0x8(%r12)
jne 0xb5d5
movl 0x14(%r12), %ebp
movl 0x4(%r12), %r12d
movq %r15, %rdi
callq 0x8082
movq %r15, %rcx
movq %rax, %r15
xorl %edx, %edx
testl %r12d, %r12d
movq %rcx, 0x70(%rsp)
je 0xb68f
movzbl (%rcx), %eax
testl %eax, %eax
je 0xb68f
movq %rbx, %r12
cmpl $0x30, %eax
je 0xb692
cmpl $0x8, %r13d
leaq 0x2447(%rip), %rax      # 0xd9fb
leaq 0x244e(%rip), %rsi      # 0xda09
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x7e30
leaq 0x2(%rbx), %r12
movl $0x2, %edx
jmp 0xb692
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, %r14
movq %r15, %rdi
callq 0x8082
movq %rax, %r15
cmpl $0x0, 0x44(%rsp)
je 0xb619
movzbl (%r14), %eax
testl %eax, %eax
je 0xb619
cmpl $0x30, %eax
jne 0xb732
movq %rbx, %rdi
callq 0x8082
leaq (%rax,%rbx), %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 0xb7ce
movl 0x58(%rsp), %ebp
cmpl %r15d, %ebp
jle 0xb673
leaq 0x1764(%rip), %r12      # 0xcdbc
decl %ebp
movq %rbx, %rdi
callq 0x8082
leaq (%rax,%rbx), %rdi
movq %r12, %rsi
callq 0x7e30
cmpl %r15d, %ebp
jg 0xb658
movq %rbx, %rdi
callq 0x8082
leaq (%rax,%rbx), %rdi
movslq %r15d, %rdx
movq %r14, %rsi
callq 0x7e4c
jmp 0xb713
movq %rbx, %r12
movl %r14d, %eax
subl %r15d, %eax
jle 0xb6c7
movl %eax, 0x38(%rsp)
movl %edx, 0x3c(%rsp)
leaq 0x1713(%rip), %r13      # 0xcdbc
decl %r14d
movq %r12, %rdi
movq %r13, %rsi
callq 0x7e30
incq %r12
cmpl %r15d, %r14d
jg 0xb6a9
movl 0x3c(%rsp), %edx
addl 0x38(%rsp), %edx
leaq 0x40(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x34(%rsp), %r12
movl %edx, (%r12)
movq 0x70(%rsp), %rsi
movq %r12, %rdx
movl %r15d, %ecx
callq 0xa83e
cmpl %ebp, (%r12)
jge 0xb70e
leaq 0x40(%rsp), %r15
leaq 0x34(%rsp), %r12
movq %r15, %rdi
movl $0x20, %esi
movq %r12, %rdx
callq 0xa810
cmpl %ebp, 0x34(%rsp)
jl 0xb6f8
movq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x8082
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x50(%rsp)
je 0xb75e
cmpl $-0x1, 0x58(%rsp)
jne 0xb75e
cmpl $0x8, %r13d
leaq 0x22b0(%rip), %rax      # 0xd9fb
leaq 0x22b7(%rip), %rsi      # 0xda09
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x7e30
movq %rbx, %rdi
callq 0x8082
leaq (%rax,%rbx), %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 0xb7ce
cmpl $0x0, 0x50(%rsp)
sete %al
movl 0x58(%rsp), %ebp
testl %ebp, %ebp
setns %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0xb64c
cmpl $0x8, %r13d
leaq 0x2245(%rip), %rax      # 0xd9fb
leaq 0x224c(%rip), %rsi      # 0xda09
cmoveq %rax, %rsi
movq %rbx, %rdi
callq 0x7e30
jmp 0xb64c