// File: /workspace/github_c_makefile_star2_O3/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 0x7a71
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)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movabsq $0x3000000010, %rcx     # imm = 0x3000000010
movq %rcx, 0x70(%rsp)
leaq 0x180(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq %rax, 0x80(%rsp)
movb (%rsi), %al
testb %al, %al
je 0x7c8b
leaq 0x5e98(%rip), %r14      # 0xd968
leaq 0x70(%rsp), %rbx
leaq 0x38(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x34(%rsp), %r13
cmpb $0x25, %al
jne 0x7b15
movq 0x40(%rsp), %rbp
leaq 0x1(%rsi), %rax
movq %rax, 0x38(%rsp)
cmpb $0x0, 0x1(%rsi)
je 0x7b39
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xa548
movq 0x38(%rsp), %rax
movb (%rax), %al
jmp 0x7b3b
movsbl %al, %esi
movq %r12, %rdi
movq %r13, %rdx
callq 0xa810
movq 0x38(%rsp), %rsi
incq %rsi
movq %rsi, 0x38(%rsp)
movl 0x34(%rsp), %ecx
jmp 0x7c71
xorl %eax, %eax
movsbl %al, %edi
callq 0x857d
movq 0x38(%rsp), %rsi
testl %eax, %eax
je 0x7b99
incq %rsi
movq %rsi, 0x38(%rsp)
movl $0x2a, %ecx
leal -0x2(%rax), %edx
cmpl $0x10, %edx
ja 0x7c5c
movslq (%r14,%rdx,4), %rdx
addq %r14, %rdx
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 %rbp, %rdi
movq %rbx, %rsi
callq 0xabe8
jmp 0x7c5a
movl $0x1, %edx
movq %rbp, %rdi
callq 0x7e4c
incq 0x38(%rsp)
incb (%rbp)
movl $0x1, %ecx
jmp 0x7c5c
movl 0x68(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0xb3d4
jmp 0x7c5a
movl 0x68(%rsp), %ecx
movl %ecx, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0xb0f4
jmp 0x7c5a
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xaab8
jmp 0x7c5a
movl 0x68(%rsp), %eax
movl %eax, 0x20(%rsp)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xaf68
movl %eax, %ecx
movslq %ecx, %rcx
addq %rcx, 0x40(%rsp)
addl 0x34(%rsp), %ecx
movl %ecx, 0x34(%rsp)
movq 0x38(%rsp), %rsi
movb (%rsi), %al
testb %al, %al
je 0x7c83
cmpl $0x1000, %ecx           # imm = 0x1000
jl 0x7ae4
cmpl $0xfff, %ecx            # imm = 0xFFF
jg 0x7c93
movq 0x40(%rsp), %rax
movb $0x0, (%rax)
movl 0x34(%rsp), %eax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)