// File: /workspace/github_c_makefile_star2_O3/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)
movb $0x0, 0x28(%rsp)
movslq 0x5c(%rdx), %rax
cmpb $0x0, (%rdi,%rax)
je 0x19fb
movq %rdi, %r15
leaq 0x18(%rbx), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x19(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x70(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x38ff(%rip), %r12      # 0x50c9
leaq 0x659f(%rip), %rbp      # 0x7d70
movslq %eax, %r13
addq %r15, %r13
movl $0x5, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x40a8
testl %eax, %eax
je 0x182d
movslq 0x60(%rbx), %r14
addq 0x8(%rbx), %r14
movq %rbp, %r12
movq %r15, %rbp
leaq 0x38c4(%rip), %r15      # 0x50c4
movq %r15, %rdi
callq 0x3ecc
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %r15
movq %r12, %rbp
leaq 0x38a5(%rip), %r12      # 0x50c9
callq 0x4108
addl $0x5, 0x5c(%rbx)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3f94
testq %rax, %rax
je 0x18a1
xorl %ecx, %ecx
leaq 0x10(%rcx), %r12
cmpq $0x80, %r12
je 0x18a1
movq (%rcx,%rbp), %r14
movq %r14, %rdi
callq 0x3ecc
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40a8
movq %r12, %rcx
testl %eax, %eax
je 0x183f
movslq 0x60(%rbx), %r13
addq 0x8(%rbx), %r13
movq -0x8(%r12,%rbp), %r12
movq %r12, %rdi
callq 0x3ecc
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x4108
movq %r14, %rdi
callq 0x3ecc
addl %eax, 0x5c(%rbx)
movslq 0x5c(%rbx), %r14
addq %r15, %r14
movl $0x4, %edx
leaq 0x387c(%rip), %rdi      # 0x5130
movq %r14, %rsi
callq 0x40a8
testl %eax, %eax
je 0x18f0
movb 0x4(%r14), %cl
addb $-0x30, %cl
movl 0x5c(%rbx), %eax
cmpb $0x9, %cl
ja 0x190a
addq $0x4, %r14
addl $0x6, %eax
movl %eax, 0x5c(%rbx)
movb $0x1, 0x67b4(%rip)      # 0x8094
movq %r14, %rdi
callq 0x400c
movl %eax, 0x94(%rbx)
jmp 0x1910
cmpb $0x0, 0x679d(%rip)      # 0x8094
leaq 0x28(%rsp), %r14
jne 0x1915
movl $0x1, 0x94(%rbx)
jmp 0x1915
addl $0x5, %eax
movl %eax, 0x5c(%rbx)
leaq 0x28(%rsp), %r14
movslq 0x5c(%rbx), %rax
movzbl (%r15,%rax), %ecx
testl %ecx, %ecx
leaq 0x37a2(%rip), %r12      # 0x50c9
je 0x195a
cmpl $0x25, %ecx
je 0x195a
movslq 0x60(%rbx), %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jg 0x195a
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 0x17d1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c5c
movq 0x20(%rsp), %rdi
callq 0x3ecc
testq %rax, %rax
je 0x19fb
movl 0x78(%rbx), %eax
cmpl $0x5, %eax
je 0x1985
cmpl $0x3, %eax
jne 0x1994
callq 0x1050
cmpq $0x2, %rax
jb 0x1a29
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x1ff0
testl %eax, %eax
je 0x19b7
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21bc
jmp 0x19c4
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1bc4
incl 0x98(%rbx)
cmpl $0x110000, 0x70(%rbx)   # imm = 0x110000
jb 0x19d9
cmpl $0x3, 0x78(%rbx)
je 0x19fb
movl $0x8, %esi
movq 0x10(%rsp), %rdi
callq 0x40f8
movb $0x0, 0x18(%rbx)
movslq 0x5c(%rbx), %rax
cmpb $0x0, (%r15,%rax)
jne 0x17d1
movq 0x8(%rbx), %rdi
leaq 0x372f(%rip), %rsi      # 0x5135
callq 0x3ee0
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x1a2e
cmpl $0xf, 0x60(%rbx)
jne 0x1a2e
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx)
movl $0x0, 0x60(%rbx)
jmp 0x1a2e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq