// File: /workspace/github_c_makefile_star2_O1/AndreIglesias[P]quick_ls/libft/libstd/depo/.././src//c/stdio/ft_printf/aux/ft_put.c
// Function: ft_putwidth
int	ft_putwidth(intmax_t lg, t_flags flags, uintmax_t x, int p)
{
	int	i;
	int	neg;
	int	iszero;

	iszero = (lg == 0 && p >= 0);
	i = iszero;
	neg = !((lg < 0 || flags.plus || flags.space) && flags.type != 'u');
	neg = !(flags.type == 'u' && flags.precision <= 0) * neg;
	x = calc_x(flags, &lg, x, &i);
	i += (flags.type == 'f' && (p != 0 || flags.square));
	if (ft_countchr("csp", flags.type) != 0)
		return (0);
	if (flags.type != 'f' && p > i)
		i = iszero;
	iszero = neg + u_width(flags, p, i, iszero);
	if (p < 0)
		iszero = calc_iszero(flags, i, iszero);
	if (ft_fillzero(p, flags, i))
		return (ft_repet_fd('0', iszero, flags.fd));
	if (p > i)
		i = p;
	return (ft_repet_fd(' ', iszero * ((flags.width - i) > 0), flags.fd));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movsbl 0xc0(%rsp), %r14d
movq %rdi, %rax
negq %rax
cmovsq %rdi, %rax
cmpl $0x75, %r14d
movl 0xa8(%rsp), %ecx
cmoveq %rdi, %rax
movl %ecx, 0x4c(%rsp)
testl %ecx, %ecx
movl $0x1, %ecx
cmoveq %rax, %rcx
setg 0x4a(%rsp)
testq %rax, %rax
cmovneq %rax, %rcx
movl %edx, %r15d
cmpl $0x75, %r14d
setne 0x4b(%rsp)
sete 0x49(%rsp)
cmovneq %rax, %rcx
testl %edx, %edx
setns %al
testq %rdi, %rdi
sete %r12b
setns 0x48(%rsp)
andb %al, %r12b
movzbl %r12b, %r13d
movl 0x98(%rsp), %eax
movl 0xa0(%rsp), %edx
movl %eax, 0x54(%rsp)
movl %edx, 0x50(%rsp)
orl %edx, %eax
sete 0x47(%rsp)
movl %r13d, %ebp
testq %rcx, %rcx
je 0x3a5e
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
movl %r13d, %ebp
incl %ebp
movq %rcx, %rax
mulq %rsi
shrq $0x3, %rdx
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x3a49
leaq 0x90(%rsp), %rax
xorl %ebx, %ebx
cmpb $0x66, %r14b
jne 0x3a78
xorl %ebx, %ebx
movl (%rax), %eax
orl %r15d, %eax
setne %bl
leaq 0x1916(%rip), %rdi      # 0x5395
movl %r14d, %esi
callq 0x4df4
testl %eax, %eax
je 0x3a9c
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb 0x47(%rsp), %al
andb 0x48(%rsp), %al
movb 0x49(%rsp), %cl
orb %al, %cl
movb 0x4b(%rsp), %al
orb 0x4a(%rsp), %al
andb %cl, %al
addl %ebp, %ebx
movl %r15d, %edi
cmpl %r15d, %ebx
cmovgel %ebx, %r13d
movzbl %al, %r15d
cmpb $0x66, %r14b
cmovel %ebx, %r13d
jne 0x3aeb
movl %edi, %ecx
cmpl $0x0, 0x4c(%rsp)
leaq 0x90(%rsp), %r10
movl 0x54(%rsp), %r8d
movl 0x50(%rsp), %r11d
jne 0x3b1a
jmp 0x3b18
cmpl %edi, %r13d
setge %al
testl %edi, %edi
setg %cl
andb %al, %cl
cmpl $0x0, 0x4c(%rsp)
sete %al
orb %cl, %al
movl %edi, %ecx
leaq 0x90(%rsp), %r10
movl 0x54(%rsp), %r8d
movl 0x50(%rsp), %r11d
je 0x3b1a
xorl %ecx, %ecx
cmpb $0x66, %r14b
setne %al
movl 0x14(%r10), %ebp
testl %ecx, %ecx
setne %dl
andb %dl, %r12b
andb %al, %r12b
movzbl %r12b, %esi
leal 0x75(%rcx), %r9d
xorl %eax, %eax
orl %r11d, %r8d
setne %dl
cmovel %ecx, %r9d
xorl %r8d, %r8d
cmpl %r14d, %r9d
setne %r8b
addl %r13d, %ecx
subl %ecx, %r15d
addl %ebp, %r15d
subl %r8d, %r15d
addl %esi, %r15d
testl %edi, %edi
jns 0x3b81
cmpb $0x66, %r14b
setne %cl
movb %dl, %al
testl %r15d, %r15d
setne %dl
andb %cl, %dl
movzbl %dl, %ecx
addl %r13d, %eax
movl %ebp, %r15d
subl %eax, %r15d
addl %ecx, %r15d
movups (%r10), %xmm0
movups 0x10(%r10), %xmm1
movups 0x20(%r10), %xmm2
movups 0x2c(%r10), %xmm3
movups %xmm3, 0x2c(%rsp)
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl %r13d, %esi
movl %edi, %ebx
movq %r10, %r14
callq 0x392f
testl %eax, %eax
je 0x3bc6
movl 0x38(%r14), %edx
movl $0x30, %edi
movl %r15d, %esi
jmp 0x3bde
cmpl %ebx, %r13d
cmovgl %r13d, %ebx
xorl %esi, %esi
cmpl %ebx, %ebp
cmovgl %r15d, %esi
movl 0x38(%r14), %edx
movl $0x20, %edi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4988
nopl (%rax)