// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
movq (%rdi), %r10
movslq (%rsi), %rdx
movl %ecx, %r11d
subl (%r10), %r11d
movl (%r10,%rdx,4), %eax
incl %r11d
cmpl %r11d, %edx
sete %r9b
cmpl $0x5f5e100, %eax        # imm = 0x5F5E100
setl %bl
andb %r9b, %bl
cmpb $0x1, %bl
jne 0x7ac8
movl $0x5f5e100, %r9d        # imm = 0x5F5E100
movl $0x9, %ebx
subl $0x1, %ebx
jb 0x7ad5
movslq %r9d, %r9
imulq $0x66666667, %r9, %r9   # imm = 0x66666667
movq %r9, %r14
shrq $0x3f, %r14
sarq $0x22, %r9
addl %r14d, %r9d
cmpl %r11d, %edx
jne 0x7ada
cmpl %eax, %r9d
jg 0x7a9f
jmp 0x7ada
movl $0x9, %ebx
movl $0x5f5e100, %r9d        # imm = 0x5F5E100
jmp 0x7ada
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ecx, %r11d
subl 0x4(%r10), %r11d
movl $0x6, %r10d
movl %r11d, -0x2c(%rbp)
cmpl %r11d, %edx
jne 0x7bac
movslq %eax, %r11
imulq $0x66666667, %r11, %r11 # imm = 0x66666667
movq %r11, %r15
shrq $0x3f, %r15
sarq $0x22, %r11
addl %r15d, %r11d
addl %r11d, %r11d
leal (%r11,%r11,4), %r11d
movl %eax, %r15d
subl %r11d, %r15d
jne 0x7bac
subl %ebx, %r10d
xorl %r15d, %r15d
movl %ebx, %r11d
leal 0x6(%r15), %r12d
leal (%rbx,%r15), %r13d
leal 0x9(%rax), %r14d
cmpl $0x13, %r14d
jb 0x7bb1
cltq
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %r14
shrq $0x3f, %r14
sarq $0x22, %rax
addl %r14d, %eax
testl %r13d, %r13d
je 0x7bbb
decl %r11d
movslq %r9d, %r9
imulq $0x66666667, %r9, %r9   # imm = 0x66666667
movq %r9, %r14
shrq $0x3f, %r14
sarq $0x22, %r9
addl %r14d, %r9d
decl %r15d
cmpl -0x2c(%rbp), %edx
jne 0x7ba3
cmpl $0x2, %r12d
jb 0x7ba3
movslq %eax, %r14
imulq $0x66666667, %r14, %r12 # imm = 0x66666667
movq %r12, %r13
shrq $0x3f, %r13
sarq $0x22, %r12
addl %r13d, %r12d
addl %r12d, %r12d
leal (%r12,%r12,4), %r12d
subl %r12d, %r14d
je 0x7b28
addl $0x6, %r15d
movl %r15d, %r10d
jmp 0x7bc1
movl %ebx, %r11d
jmp 0x7bc1
xorl %eax, %eax
movl %r12d, %r10d
movl %r13d, %r11d
jmp 0x7bc1
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
testl %r11d, %r11d
je 0x7c1b
incl %r10d
cltd
idivl %r9d
addb $0x30, %al
movq (%r8), %rbx
leaq 0x1(%rbx), %r14
movq %r14, (%r8)
movb %al, (%rbx)
movq (%rdi), %rax
movl %ecx, %ebx
subl 0x4(%rax), %ebx
movl %edx, %eax
cmpl %ebx, (%rsi)
jne 0x7bfb
cmpl %r11d, %r10d
jne 0x7bfb
movq (%r8), %rdx
leaq 0x1(%rdx), %rbx
movq %rbx, (%r8)
movb $0x2e, (%rdx)
decl %r11d
movslq %r9d, %rdx
imulq $0x66666667, %rdx, %r9  # imm = 0x66666667
movq %r9, %rdx
shrq $0x3f, %rdx
sarq $0x22, %r9
addl %edx, %r9d
testl %r11d, %r11d
jne 0x7bc9
incl (%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq