// File: /workspace/github_c_makefile_star2_O1/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 0x19fd
movq %rdi, %r15
leaq 0x18(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x19(%rbx), %rax
movq %rax, 0x18(%rsp)
leaq 0x70(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x38fb(%rip), %r12      # 0x50c9
leaq 0x659b(%rip), %rbp      # 0x7d70
movslq 0x5c(%rbx), %r13
addq %r15, %r13
movl $0x5, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x40e8
testl %eax, %eax
je 0x1832
movslq 0x60(%rbx), %r14
addq 0x8(%rbx), %r14
movq %rbp, %r12
movq %r15, %rbp
leaq 0x38bf(%rip), %r15      # 0x50c4
movq %r15, %rdi
callq 0x3ef0
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %r15
movq %r12, %rbp
leaq 0x38a0(%rip), %r12      # 0x50c9
callq 0x4148
addl $0x5, 0x5c(%rbx)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3fb8
testq %rax, %rax
je 0x18a6
xorl %ecx, %ecx
leaq 0x10(%rcx), %r12
cmpq $0x80, %r12
je 0x18a6
movq (%rcx,%rbp), %r14
movq %r14, %rdi
callq 0x3ef0
movq %r14, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x40e8
movq %r12, %rcx
testl %eax, %eax
je 0x1844
movslq 0x60(%rbx), %r13
addq 0x8(%rbx), %r13
movq -0x8(%r12,%rbp), %r12
movq %r12, %rdi
callq 0x3ef0
addl 0x60(%rbx), %eax
movl %eax, 0x60(%rbx)
movslq %eax, %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0x4148
movq %r14, %rdi
callq 0x3ef0
addl %eax, 0x5c(%rbx)
movslq 0x5c(%rbx), %r14
addq %r15, %r14
movl $0x4, %edx
leaq 0x3877(%rip), %rdi      # 0x5130
movq %r14, %rsi
callq 0x40e8
testl %eax, %eax
je 0x18f5
movb 0x4(%r14), %cl
addb $-0x30, %cl
movl 0x5c(%rbx), %eax
cmpb $0x9, %cl
ja 0x190f
addq $0x4, %r14
addl $0x6, %eax
movl %eax, 0x5c(%rbx)
movb $0x1, 0x67af(%rip)      # 0x8094
movq %r14, %rdi
callq 0x4038
movl %eax, 0x94(%rbx)
jmp 0x1915
cmpb $0x0, 0x6798(%rip)      # 0x8094
leaq 0x28(%rsp), %r14
jne 0x191a
movl $0x1, 0x94(%rbx)
jmp 0x191a
addl $0x5, %eax
movl %eax, 0x5c(%rbx)
leaq 0x28(%rsp), %r14
movslq 0x5c(%rbx), %rax
movzbl (%r15,%rax), %ecx
testl %ecx, %ecx
leaq 0x379d(%rip), %r12      # 0x50c9
je 0x195c
cmpl $0x25, %ecx
je 0x195c
movslq 0x60(%rbx), %rcx
cmpq $0x2710, %rcx           # imm = 0x2710
jg 0x195c
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)
jmp 0x17d5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3c84
movq 0x20(%rsp), %rdi
callq 0x3ef0
testq %rax, %rax
je 0x19fd
movl 0x78(%rbx), %eax
cmpl $0x5, %eax
je 0x1987
cmpl $0x3, %eax
jne 0x1996
callq 0x1050
cmpq $0x2, %rax
jb 0x1a2b
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x1ffc
testl %eax, %eax
je 0x19b9
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21ac
jmp 0x19c6
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1bd0
incl 0x98(%rbx)
cmpl $0x110000, 0x70(%rbx)   # imm = 0x110000
jb 0x19db
cmpl $0x3, 0x78(%rbx)
je 0x19fd
movl $0x8, %esi
movq 0x10(%rsp), %rdi
callq 0x4138
movb $0x0, 0x18(%rbx)
movslq 0x5c(%rbx), %rax
cmpb $0x0, (%r15,%rax)
jne 0x17d5
movq 0x8(%rbx), %rdi
leaq 0x372d(%rip), %rsi      # 0x5135
callq 0x3f04
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x1a30
cmpl $0xf, 0x60(%rbx)
jne 0x1a30
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx)
movl $0x0, 0x60(%rbx)
jmp 0x1a30
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq