// File: /workspace/github_c_makefile_star2_O1/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 0x7355
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
setne %dl
movl $0x1000, %ecx           # imm = 0x1000
negl %ecx
setl %cl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7574
leaq 0x6502(%rip), %r14      # 0xd8c8
leaq 0x70(%rsp), %rbx
leaq 0x38(%rsp), %r15
leaq 0x40(%rsp), %r12
leaq 0x34(%rsp), %r13
cmpb $0x25, %al
jne 0x7469
movq 0x40(%rsp), %rbp
leaq 0x1(%rsi), %rax
movq %rax, 0x38(%rsp)
cmpb $0x0, 0x1(%rsi)
je 0x7406
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9da0
movq 0x38(%rsp), %rax
movsbl (%rax), %edi
callq 0x7e8d
movq 0x38(%rsp), %rsi
testl %eax, %eax
je 0x7481
incq %rsi
movq %rsi, 0x38(%rsp)
movl $0x2a, %ecx
leal -0x2(%rax), %edx
cmpl $0x10, %edx
ja 0x7544
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 0xa440
jmp 0x7542
movsbl %al, %esi
movq %r12, %rdi
movq %r13, %rdx
callq 0xa05c
incq 0x38(%rsp)
jmp 0x7550
movl $0x1, %edx
movq %rbp, %rdi
callq 0x7718
incq 0x38(%rsp)
incb (%rbp)
movl $0x1, %ecx
jmp 0x7544
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 0xabf8
jmp 0x7542
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 0xa96c
jmp 0x7542
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 0xa314
jmp 0x7542
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 0xa7e0
movl %eax, %ecx
movslq %ecx, %rax
addq %rax, 0x40(%rsp)
addl %eax, 0x34(%rsp)
movq 0x38(%rsp), %rsi
movb (%rsi), %al
movl 0x34(%rsp), %edx
cmpl $0x1000, %edx           # imm = 0x1000
setl %cl
testb %al, %al
je 0x7574
cmpl $0x1000, %edx           # imm = 0x1000
jl 0x73da
testb %cl, %cl
je 0x7580
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
nop