// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsdtoa.c
// Function: js_grisu2
int
js_grisu2(double v, char *buffer, int *K)
{
	int length, mk;
	diy_fp_t w_m, w_p, c_mk, Wp, Wm, delta;
	int q = 64, alpha = -59, gamma = -56;
	normalized_boundaries(v, &w_m, &w_p);
	mk = k_comp(w_p.e + q, alpha, gamma);
	c_mk = cached_power(mk);
	Wp = multiply(w_p, c_mk);
	Wm = multiply(w_m, c_mk);
	Wm.f++; Wp.f--;
	delta = minus(Wp, Wm);
	*K = -mk;
	digit_gen(Wp, delta, buffer, &length, K);
	return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movabsq $0x10000000000000, %rax # imm = 0x10000000000000
movq %xmm0, %r13
leaq -0x1(%rax), %rcx
andq %r13, %rcx
shrq $0x34, %r13
andl $0x7ff, %r13d           # imm = 0x7FF
movq %rcx, %rdx
btsq $0x34, %rdx
testl %r13d, %r13d
cmoveq %rcx, %rdx
leal -0x433(%r13), %ecx
movl $0xfffffbce, %r9d       # imm = 0xFFFFFBCE
cmovnel %ecx, %r9d
leaq (%rdx,%rdx), %r8
leaq 0x1(,%rdx,2), %r15
leal -0x1(%r9), %ecx
cmpl $0x1, %r13d
adcl $0x0, %r13d
leal -0x402(%r13), %r10d
addl $0xfffffbc2, %r13d      # imm = 0xFFFFFBC2
btq $0x35, %r15
jb 0x90a1
addq %r15, %r15
decl %r10d
decl %r13d
jmp 0x908f
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
shlq $0xa, %r15
addl $-0x2, %r9d
decq %r8
cmpq %rax, %rdx
movabsq $0x3fffffffffffff, %rbp # imm = 0x3FFFFFFFFFFFFF
cmovneq %r8, %rbp
cmovel %r9d, %ecx
subl %r13d, %ecx
shlq %cl, %rbp
negl %r10d
cvtsi2sd %r10d, %xmm0
mulsd 0x173cf(%rip), %xmm0    # 0x204b0
callq 0x3090
cvttsd2si %xmm0, %eax
movl %eax, 0x4(%rsp)
cltq
leaq 0x1c8d9(%rip), %rcx     # 0x259d0
movq 0xab8(%rcx,%rax,8), %rbx
leaq 0x1de4a(%rip), %rcx     # 0x26f50
movl 0x55c(%rcx,%rax,4), %r14d
movq %r15, %rdi
movl %r13d, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x926d
movq %rax, %r15
movl %edx, %r12d
movq %rbp, %rdi
movl %r13d, %esi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x926d
cmpl %edx, %r12d
jne 0x922f
incq %rax
decq %r15
movq %r15, %r8
subq %rax, %r8
movq 0x10(%rsp), %r14
jb 0x924e
negl %r12d
movq %r15, %rsi
movl %r12d, %ecx
shrq %cl, %rsi
pushq $-0x1
popq %r9
shlq %cl, %r9
movl 0x4(%rsp), %eax
negl %eax
movl %eax, (%r14)
notq %r9
andq %r9, %r15
pushq $0x64
popq %rcx
pushq $0x3
popq %r10
xorl %r11d, %r11d
pushq $0xa
popq %rbx
movq 0x8(%rsp), %r13
subl $0x1, %r10d
jb 0x91dd
cmpl %esi, %ecx
seta %al
testl %r11d, %r11d
sete %dl
xorl %edi, %edi
testb %dl, %al
jne 0x91b7
movl %esi, %eax
xorl %edx, %edx
divl %ecx
addb $0x30, %al
movslq %r11d, %rdx
incl %r11d
movb %al, (%r13,%rdx)
movl %r11d, %edi
movl %esi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %esi
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movq %rsi, %rdx
movl %r12d, %ecx
shlq %cl, %rdx
addq %r15, %rdx
movl %edi, %r11d
movl %eax, %ecx
cmpq %r8, %rdx
ja 0x918a
jmp 0x921b
xorl %r10d, %r10d
imulq $0xa, %r15, %r15
movq %r15, %rax
movl %r12d, %ecx
shrq %cl, %rax
movl %eax, %ecx
orl %r11d, %ecx
movl $0x0, %edi
je 0x9209
addb $0x30, %al
movslq %r11d, %rcx
incl %r11d
movb %al, (%r13,%rcx)
movl %r11d, %edi
andq %r9, %r15
decl %r10d
imulq $0xa, %r8, %r8
movl %edi, %r11d
cmpq %r8, %r15
ja 0x91e0
addl %r10d, (%r14)
movl %edi, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20060(%rip), %rdi     # 0x29296
leaq 0x20064(%rip), %rsi     # 0x292a1
leaq 0x20068(%rip), %rcx     # 0x292ac
movl $0x182, %edx            # imm = 0x182
callq 0x3130
leaq 0x2007a(%rip), %rdi     # 0x292cf
leaq 0x20045(%rip), %rsi     # 0x292a1
leaq 0x20049(%rip), %rcx     # 0x292ac
movl $0x183, %edx            # imm = 0x183
callq 0x3130