// File: /workspace/github_c_makefile_star2_O0/AugustinLopez[P]Fancy_Ft_Malloc/minilibft/printf/ftoa/f_putnbr.c
// Function: ft_putnbr_pos_addentum
void		ft_putnbr_pos_addentum(int **stack, int *i, char **tmp, int dbl_tab)
{
	int				len;
	int				buf;
	char			c;
	int				dot;
	int				n;

	buf = 100000000;
	len = 9;
	dot = 6;
	n = (*stack)[*i];
	while (*i == dbl_tab - (*stack)[0] + 1 && buf > n && len--)
		buf /= 10;
	while (*i == dbl_tab - (*stack)[1] && dot > 0 && n % 10 == 0
			&& (n /= 10) && len-- && dot--)
		buf /= 10;
	while (len--)
	{
		c = n / buf + '0';
		((*tmp)++)[0] = c;
		if (*i == dbl_tab - (*stack)[1] && len == dot)
			((*tmp)++)[0] = '.';
		n %= buf;
		buf /= 10;
	}
	(*i)++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x5f5e100, -0x24(%rbp) # imm = 0x5F5E100
movl $0x9, -0x20(%rbp)
movl $0x6, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movslq (%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
subl (%rax), %edx
addl $0x1, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x31(%rbp)
jne 0xaf2b
movl -0x24(%rbp), %ecx
xorl %eax, %eax
cmpl -0x30(%rbp), %ecx
movb %al, -0x31(%rbp)
jle 0xaf2b
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x20(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xaf34
jmp 0xaf44
movl -0x24(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
jmp 0xaeec
jmp 0xaf46
movq -0x10(%rbp), %rax
movl (%rax), %ecx
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
subl 0x4(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x32(%rbp)
jne 0xafc5
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
movb %al, -0x32(%rbp)
jle 0xafc5
movl -0x30(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
xorl %eax, %eax
cmpl $0x0, %edx
movb %al, -0x32(%rbp)
jne 0xafc5
movl -0x30(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl %ecx, -0x30(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rbp)
je 0xafc5
movl -0x20(%rbp), %ecx
movl %ecx, %eax
addl $-0x1, %eax
movl %eax, -0x20(%rbp)
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x32(%rbp)
je 0xafc5
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0xafce
jmp 0xafe1
movl -0x24(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
jmp 0xaf46
jmp 0xafe3
movl -0x20(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x20(%rbp)
cmpl $0x0, %eax
je 0xb068
movl -0x30(%rbp), %eax
cltd
idivl -0x24(%rbp)
addl $0x30, %eax
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %cl
movq -0x18(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rdx
movq (%rdx), %rdx
subl 0x4(%rdx), %ecx
cmpl %ecx, %eax
jne 0xb049
movl -0x20(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0xb049
movq -0x18(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, (%rcx)
movb $0x2e, (%rax)
movl -0x24(%rbp), %ecx
movl -0x30(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0x30(%rbp)
movl -0x24(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
jmp 0xafe3
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)