// File: /workspace/github_c_makefile_star2_O2/Sigabort42[P]WoodyWoodPacker/libft/ft_printf/ft_printf.c
// Function: ft_printf2
int					ft_printf2(const char *format, va_list ap, t_var *var)
{
	t_flags			s_flags;

	s_flags.c = 0;
	while (format[var->ret])
	{
		while (!ft_color(&format[var->ret], var) &&
				!ft_fd(&format[var->ret], var) &&
		format[var->ret] && format[var->ret] != '%' && var->i_buf <= 10000)
			var->buf[var->i_buf++] = format[var->ret++];
		ft_verif_buf(var, format);
		if (!ft_strlen(var->flags_stock))
			break ;
		if ((var->type == TYPE_WSTRING || var->type == TYPE_WCHAR) &&
			MB_CUR_MAX <= 1)
			return (-1);
		(!ft_flags(&var->flags_stock[1], &s_flags)) ? ft_print_buffer(ap, var) :
			ft_print_flags_buffer(ap, var, &s_flags);
		var->nb_conv++;
		if (var->nb.u_i > 1114111 && var->type == TYPE_WCHAR)
			break ;
		ft_bzero(var->nb.str, 8);
		var->flags_stock[0] = 0;
	}
	ft_verif(var);
	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
leaq 0x28(%rsp), %rsi
movb $0x0, (%rsi)
leaq 0x18(%rdx), %rax
movq %rax, 0x10(%rsp)
leaq 0x19(%rdx), %rax
movq %rax, 0x20(%rsp)
leaq 0x70(%rdx), %rax
movq %rax, 0x18(%rsp)
leaq 0x6609(%rip), %r14      # 0x7d70
movslq 0x5c(%rbx), %rax
cmpb $0x0, (%r15,%rax)
je 0x197e
movslq %eax, %rbp
addq %r15, %rbp
leaq 0x3946(%rip), %rdi      # 0x50c9
movq %rbp, %rsi
pushq $0x5
popq %rdx
callq 0x3eec
testl %eax, %eax
je 0x17c1
movslq 0x60(%rbx), %r13
addq 0x8(%rbx), %r13
leaq 0x3923(%rip), %r12      # 0x50c4
movq %r12, %rdi
callq 0x3d20
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x3f4c
addl $0x5, 0x5c(%rbx)
movq %rbp, %rdi
leaq 0x38fe(%rip), %rsi      # 0x50c9
callq 0x3df4
testq %rax, %rax
je 0x1839
xorl %ecx, %ecx
leaq 0x10(%rcx), %r12
cmpq $0x80, %r12
je 0x1839
movq (%rcx,%r14), %r13
movq %r13, %rdi
callq 0x3d20
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x3eec
movq %r12, %rcx
testl %eax, %eax
je 0x17d7
movslq 0x60(%rbx), %rbp
addq 0x8(%rbx), %rbp
movq -0x8(%r12,%r14), %r12
movq %r12, %rdi
callq 0x3d20
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3f4c
movq %r13, %rdi
callq 0x3d20
addl %eax, 0x5c(%rbx)
movslq 0x5c(%rbx), %r13
addq %r15, %r13
leaq 0x38e9(%rip), %rdi      # 0x5130
movq %r13, %rsi
pushq $0x4
popq %rdx
callq 0x3eec
testl %eax, %eax
je 0x188b
movb 0x4(%r13), %cl
addb $-0x30, %cl
movl 0x5c(%rbx), %eax
cmpb $0x9, %cl
leaq 0x28(%rsp), %r12
ja 0x18a5
addq $0x4, %r13
addl $0x6, %eax
movl %eax, 0x5c(%rbx)
movb $0x1, 0x6811(%rip)      # 0x808c
movq %r13, %rdi
callq 0x3e64
movl %eax, 0x94(%rbx)
jmp 0x18ab
cmpb $0x0, 0x67fa(%rip)      # 0x808c
leaq 0x28(%rsp), %r12
jne 0x18ab
movl $0x1, 0x94(%rbx)
jmp 0x18ab
addl $0x5, %eax
movl %eax, 0x5c(%rbx)
movslq 0x5c(%rbx), %rax
movzbl (%r15,%rax), %ecx
testl %ecx, %ecx
je 0x18e9
cmpl $0x25, %ecx
je 0x18e9
movslq 0x60(%rbx), %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jg 0x18e9
leal 0x1(%rax), %edx
movl %edx, 0x5c(%rbx)
movb (%r15,%rax), %al
movq 0x8(%rbx), %rdx
leal 0x1(%rcx), %esi
movl %esi, 0x60(%rbx)
movb %al, (%rdx,%rcx)
movl 0x5c(%rbx), %eax
jmp 0x1776
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3acc
movq 0x10(%rsp), %rdi
callq 0x3d20
testq %rax, %rax
je 0x197e
movl 0x78(%rbx), %eax
cmpl $0x5, %eax
je 0x1910
cmpl $0x3, %eax
jne 0x191f
callq 0x1050
cmpq $0x2, %rax
jb 0x19a7
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x1f4c
testl %eax, %eax
je 0x1942
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x210c
jmp 0x194f
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1b3c
incl 0x98(%rbx)
cmpl $0x110000, 0x70(%rbx)   # imm = 0x110000
jb 0x1964
cmpl $0x3, 0x78(%rbx)
je 0x197e
movq 0x18(%rsp), %rdi
pushq $0x8
popq %rsi
callq 0x3f38
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0x1767
movq 0x8(%rbx), %rdi
leaq 0x37ac(%rip), %rsi      # 0x5135
callq 0x3d30
xorl %ecx, %ecx
testl %eax, %eax
jne 0x19aa
cmpl $0xf, 0x60(%rbx)
jne 0x19aa
movq 0x8(%rbx), %rax
movb $0x0, (%rax)
andl $0x0, 0x60(%rbx)
jmp 0x19aa
pushq $-0x1
popq %rcx
movl %ecx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq