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

	nbyte = 0;
	va_start(ap, str);
	while (*str && nbyte < PAGESIZE)
	{
		if (*str != '%')
		{
			add_one_to_buf(&buf, *str, &nbyte);
			str++;
		}
		else
		{
			i = parse_string(buf, &str, ap);
			buf += i;
			nbyte += i;
		}
	}
	if (nbyte < PAGESIZE)
		*buf = '\0';
	va_end(ap);
	return (nbyte);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
testb %al, %al
je 0x6e25
movaps %xmm0, 0xc0(%rsp)
movaps %xmm1, 0xd0(%rsp)
movaps %xmm2, 0xe0(%rsp)
movaps %xmm3, 0xf0(%rsp)
movaps %xmm4, 0x100(%rsp)
movaps %xmm5, 0x110(%rsp)
movaps %xmm6, 0x120(%rsp)
movaps %xmm7, 0x130(%rsp)
leaq 0x90(%rsp), %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %r8, 0x20(%rax)
movq %r9, 0x28(%rax)
leaq 0x40(%rsp), %rbx
movq %rdi, (%rbx)
leaq 0x30(%rsp), %rcx
movq %rsi, (%rcx)
leaq 0x3c(%rsp), %r15
andl $0x0, (%r15)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
leaq 0x70(%rsp), %r12
movq %rcx, (%r12)
leaq 0x180(%rsp), %rcx
movq %rcx, 0x8(%r12)
movq %rax, 0x10(%r12)
xorl %ecx, %ecx
pushq $0x2a
popq %rbp
leaq 0x5a41(%rip), %r14      # 0xc8c8
movsbl (%rsi), %eax
testl %eax, %eax
je 0x702a
cmpl $0xfff, %ecx            # imm = 0xFFF
jg 0x702a
cmpb $0x25, %al
jne 0x6ed1
movq 0x40(%rsp), %r13
leaq 0x1(%rsi), %rax
movq %rax, 0x30(%rsp)
cmpb $0x0, 0x1(%rsi)
je 0x6ef1
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r12, %rdx
callq 0x973c
movq 0x30(%rsp), %rax
movb (%rax), %al
jmp 0x6ef3
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x999c
movq 0x30(%rsp), %rsi
incq %rsi
movq %rsi, 0x30(%rsp)
movl 0x3c(%rsp), %ecx
jmp 0x6e87
xorl %eax, %eax
movsbl %al, %edi
callq 0x77e5
movq 0x30(%rsp), %rsi
testl %eax, %eax
je 0x6f50
incq %rsi
movq %rsi, 0x30(%rsp)
leal -0x2(%rax), %edx
movl %ebp, %ecx
cmpl $0x10, %edx
ja 0x7010
movslq (%r14,%rdx,4), %rdx
addq %r14, %rdx
movl %ebp, %ecx
jmpq *%rdx
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9d10
jmp 0x700e
movq %r13, %rdi
pushq $0x1
popq %rdx
callq 0x71a9
incq 0x30(%rsp)
incb (%r13)
pushq $0x1
popq %rcx
jmp 0x7010
movl 0x68(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0xa4e8
jmp 0x700e
movl 0x68(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0xa228
jmp 0x700e
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x9be4
jmp 0x700e
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0xa09c
movl %eax, %ecx
movslq %ecx, %rcx
addq %rcx, 0x40(%rsp)
addl 0x3c(%rsp), %ecx
movl %ecx, 0x3c(%rsp)
movq 0x30(%rsp), %rsi
jmp 0x6e87
cmpl $0xfff, %ecx            # imm = 0xFFF
jg 0x703a
movq 0x40(%rsp), %rax
movb $0x0, (%rax)
movl 0x3c(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq