#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ dd_abs(double const *, double *);
int /*<<< orphan*/ dd_dec_d(double *, double);
int /*<<< orphan*/ dd_div(double *, double *, double *);
int /*<<< orphan*/ dd_div_dd_d(double *, double, double *);
int dd_geq_dd_d(double *, double);
int dd_gt_dd_d(double *, double);
int /*<<< orphan*/ dd_ldexp(double *, int);
int dd_lt_dd_d(double *, double);
int /*<<< orphan*/ dd_mlt(double *, double *);
int /*<<< orphan*/ dd_mlt_d(double *, double);
int /*<<< orphan*/ dd_npwr(double *, int, double *);
int /*<<< orphan*/ fabs(double const);
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ log10(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void dd_to_digits(const double *a, char *s, int *expn, int precision) {
  int D = precision + 1;
  double acc[2];
  double tmp[2];
  int i, d, e;
  dd_abs(a, acc);
  if (a[0] == 0.0) {
    expn = 0;
    for (i = 0; i < precision; i++)
      s[i] = '0';
    return;
  }
  e = (int)(floor(log10(fabs(a[0]))));
  if (e < -300) {
    tmp[0] = 10.0;
    tmp[1] = 0.0;
    dd_npwr(tmp, 300, tmp);
    dd_mlt(acc, tmp);
    tmp[0] = 10.0;
    tmp[1] = 0.0;
    dd_npwr(tmp, e + 300, tmp);
    dd_div(acc, tmp, acc);
  } else if (e > 300) {
    dd_ldexp(acc, -53);
    tmp[0] = 10.0;
    tmp[1] = 0.0;
    dd_npwr(tmp, e, tmp);
    dd_div(acc, tmp, acc);
    dd_ldexp(acc, 53);
  } else {
    tmp[0] = 10.0;
    tmp[1] = 0.0;
    dd_npwr(tmp, e, tmp);
    dd_div(acc, tmp, acc);
  }
  if (dd_gt_dd_d(acc, 10.0) == 1) {
    dd_div_dd_d(acc, 10.0, acc);
    e++;
  } else if (dd_lt_dd_d(acc, 1.0) == 1) {
    dd_mlt_d(acc, 10.0);
    e--;
  }
  if ((dd_geq_dd_d(acc, 10.0) == 1) || (dd_lt_dd_d(acc, 1.0) == 1)) {
    printf("dd_to_digits: cannot compute exponent");
    return;
  }
  for (i = 0; i < D; i++) {
    d = ((int)acc[0]);
    dd_dec_d(acc, (double)d);
    dd_mlt_d(acc, 10.0);
    s[i] = ((char)(d + '0'));
  }
  for (i = D - 1; i > 0; i--) {
    if (s[i] < '0') {
      s[i - 1]--;
      s[i] += 10;
    } else if (s[i] > '9') {
      s[i - 1]++;
      s[i] -= 10;
    }
  }
  if (s[0] <= '0') {
    printf("dd_to_digits: nonpositive leading digit");
    return;
  }
  if (s[D - 1] >= '5') {
    s[D - 2]++;
    i = D - 2;
    while (i > 0 && s[i] > '9') {
      s[i] -= 10;
      s[--i]++;
    }
  }
  if (s[0] > '9') {
    e++;
    for (i = precision; i >= 2; i--)
      s[i] = s[i - 1];
    s[0] = '1';
    s[1] = '0';
  }
  s[precision] = 0;
  *expn = e;
}


x86 assembly (clang, -O0):
<dd_to_digits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   10e0 <dd_abs@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1272 <dd_to_digits+0x82>
jp     1272 <dd_to_digits+0x82>
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    126d <dd_to_digits+0x7d>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1247 <dd_to_digits+0x57>
jmp    16aa <dd_to_digits+0x4ba>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   10c0 <fabs@plt>
mov    %eax,%edi
call   10f0 <log10@plt>
mov    %eax,%edi
call   1110 <floor@plt>
mov    %eax,-0x4c(%rbp)
cmpl   $0xfffffed4,-0x4c(%rbp)
jge    1312 <dd_to_digits+0x122>
movsd  0xd5b(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
lea    -0x40(%rbp),%rdx
mov    $0x12c,%esi
call   1060 <dd_npwr@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <dd_mlt@plt>
movsd  0xd27(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4c(%rbp),%esi
add    $0x12c,%esi
lea    -0x40(%rbp),%rdx
call   1060 <dd_npwr@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1070 <dd_div@plt>
jmp    13b1 <dd_to_digits+0x1c1>
cmpl   $0x12c,-0x4c(%rbp)
jle    1376 <dd_to_digits+0x186>
lea    -0x30(%rbp),%rdi
mov    $0xffffffcb,%esi
call   1050 <dd_ldexp@plt>
movsd  0xccb(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4c(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1060 <dd_npwr@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1070 <dd_div@plt>
lea    -0x30(%rbp),%rdi
mov    $0x35,%esi
call   1050 <dd_ldexp@plt>
jmp    13ac <dd_to_digits+0x1bc>
movsd  0xc82(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x4c(%rbp),%esi
lea    -0x40(%rbp),%rdx
call   1060 <dd_npwr@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1070 <dd_div@plt>
jmp    13b1 <dd_to_digits+0x1c1>
lea    -0x30(%rbp),%rdi
movsd  0xc43(%rip),%xmm0
call   10b0 <dd_gt_dd_d@plt>
cmp    $0x1,%eax
jne    13ee <dd_to_digits+0x1fe>
lea    -0x30(%rbp),%rdi
lea    -0x30(%rbp),%rsi
movsd  0xc25(%rip),%xmm0
call   1100 <dd_div_dd_d@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1427 <dd_to_digits+0x237>
lea    -0x30(%rbp),%rdi
movsd  0xc0e(%rip),%xmm0
call   1080 <dd_lt_dd_d@plt>
cmp    $0x1,%eax
jne    1422 <dd_to_digits+0x232>
lea    -0x30(%rbp),%rdi
movsd  0xbec(%rip),%xmm0
call   10d0 <dd_mlt_d@plt>
mov    -0x4c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4c(%rbp)
jmp    1427 <dd_to_digits+0x237>
lea    -0x30(%rbp),%rdi
movsd  0xbcd(%rip),%xmm0
call   1030 <dd_geq_dd_d@plt>
cmp    $0x1,%eax
je     145b <dd_to_digits+0x26b>
lea    -0x30(%rbp),%rdi
movsd  0xbbb(%rip),%xmm0
call   1080 <dd_lt_dd_d@plt>
cmp    $0x1,%eax
jne    146c <dd_to_digits+0x27c>
lea    0xbae(%rip),%rdi
call   1090 <printf@plt>
jmp    16aa <dd_to_digits+0x4ba>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    14c7 <dd_to_digits+0x2d7>
cvttsd2si -0x30(%rbp),%eax
mov    %eax,-0x48(%rbp)
lea    -0x30(%rbp),%rdi
cvtsi2sdl -0x48(%rbp),%xmm0
call   10a0 <dd_dec_d@plt>
lea    -0x30(%rbp),%rdi
movsd  0xb5f(%rip),%xmm0
call   10d0 <dd_mlt_d@plt>
mov    -0x48(%rbp),%eax
add    $0x30,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1473 <dd_to_digits+0x283>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jle    1571 <dd_to_digits+0x381>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jge    151c <dd_to_digits+0x32c>
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
add    $0xff,%dl
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
add    $0xa,%edx
mov    %dl,(%rax,%rcx,1)
jmp    155e <dd_to_digits+0x36e>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1559 <dd_to_digits+0x369>
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
sub    $0xa,%edx
mov    %dl,(%rax,%rcx,1)
jmp    155e <dd_to_digits+0x36e>
jmp    1563 <dd_to_digits+0x373>
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    14d0 <dd_to_digits+0x2e0>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jg     1592 <dd_to_digits+0x3a2>
lea    0xaae(%rip),%rdi
call   1090 <printf@plt>
jmp    16aa <dd_to_digits+0x4ba>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x35,%eax
jl     1634 <dd_to_digits+0x444>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x44(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x44(%rbp)
mov    %al,-0x4d(%rbp)
jle    15ef <dd_to_digits+0x3ff>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
setg   %al
mov    %al,-0x4d(%rbp)
mov    -0x4d(%rbp),%al
test   $0x1,%al
jne    15ff <dd_to_digits+0x40f>
jmp    162f <dd_to_digits+0x43f>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
sub    $0xa,%edx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x44(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
add    $0x1,%dl
mov    %dl,(%rax,%rcx,1)
jmp    15cb <dd_to_digits+0x3db>
jmp    1634 <dd_to_digits+0x444>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1695 <dd_to_digits+0x4a5>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
cmpl   $0x2,-0x44(%rbp)
jl     1686 <dd_to_digits+0x496>
mov    -0x10(%rbp),%rax
mov    -0x44(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x44(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x44(%rbp)
jmp    1653 <dd_to_digits+0x463>
mov    -0x10(%rbp),%rax
movb   $0x31,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x30,0x1(%rax)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x4c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_to_digits>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,%r12d
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
mov    %rsp,%rsi
call   10f0 <dd_abs@plt>
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1250 <dd_to_digits+0x50>
jp     1250 <dd_to_digits+0x50>
test   %r12d,%r12d
jle    13da <dd_to_digits+0x1da>
mov    %r12d,%edx
mov    %r13,%rdi
mov    $0x30,%esi
call   10a0 <memset@plt>
jmp    13da <dd_to_digits+0x1da>
call   10d0 <fabs@plt>
mov    %eax,%edi
call   1100 <log10@plt>
mov    %eax,%edi
call   1120 <floor@plt>
mov    %rax,%r14
cmp    $0xfffffed3,%r14d
jg     12c9 <dd_to_digits+0xc9>
movsd  0xd89(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x12c,%esi
mov    %rbx,%rdx
call   1060 <dd_npwr@plt>
mov    %rsp,%rbp
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1040 <dd_mlt@plt>
movsd  0xd59(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x12c(%r14),%esi
mov    %rbx,%rdi
mov    %rbx,%rdx
call   1060 <dd_npwr@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
jmp    1348 <dd_to_digits+0x148>
cmp    $0x12d,%r14d
jl     131f <dd_to_digits+0x11f>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xffffffcb,%esi
call   1050 <dd_ldexp@plt>
movsd  0xd16(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
call   1060 <dd_npwr@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rbx,%rdx
call   1070 <dd_div@plt>
mov    %rbx,%rdi
mov    $0x35,%esi
call   1050 <dd_ldexp@plt>
jmp    134d <dd_to_digits+0x14d>
movsd  0xcd9(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
call   1060 <dd_npwr@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    %rdi,%rdx
call   1070 <dd_div@plt>
mov    %rsp,%rdi
movsd  0xca8(%rip),%xmm0
call   10c0 <dd_gt_dd_d@plt>
cmp    $0x1,%eax
jne    137b <dd_to_digits+0x17b>
movsd  0xc96(%rip),%xmm0
mov    %rsp,%rdi
mov    %rdi,%rsi
call   1110 <dd_div_dd_d@plt>
add    $0x1,%r14d
jmp    13a4 <dd_to_digits+0x1a4>
mov    %rsp,%rdi
movsd  0xc82(%rip),%xmm0
call   1080 <dd_lt_dd_d@plt>
cmp    $0x1,%eax
jne    13a4 <dd_to_digits+0x1a4>
mov    %rsp,%rdi
movsd  0xc65(%rip),%xmm0
call   10e0 <dd_mlt_d@plt>
add    $0xffffffff,%r14d
mov    %rsp,%rdi
movsd  0xc51(%rip),%xmm0
call   1030 <dd_geq_dd_d@plt>
cmp    $0x1,%eax
je     13ce <dd_to_digits+0x1ce>
mov    %rsp,%rdi
movsd  0xc44(%rip),%xmm0
call   1080 <dd_lt_dd_d@plt>
cmp    $0x1,%eax
jne    13e9 <dd_to_digits+0x1e9>
lea    0xc3b(%rip),%rdi
call   1090 <printf@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   %r12d,%r12d
js     14a4 <dd_to_digits+0x2a4>
mov    %r14,0x18(%rsp)
mov    %r15,0x10(%rsp)
lea    0x1(%r12),%ebp
xor    %r14d,%r14d
mov    %rsp,%rbx
nopw   0x0(%rax,%rax,1)
movsd  (%rsp),%xmm0
cvttsd2si %xmm0,%r15d
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
mov    %rbx,%rdi
call   10b0 <dd_dec_d@plt>
mov    %rbx,%rdi
movsd  0xbcb(%rip),%xmm0
call   10e0 <dd_mlt_d@plt>
add    $0x30,%r15b
mov    %r15b,0x0(%r13,%r14,1)
add    $0x1,%r14
cmp    %r14,%rbp
jne    1410 <dd_to_digits+0x210>
test   %r12d,%r12d
mov    0x10(%rsp),%r15
mov    0x18(%rsp),%r14
jle    14a4 <dd_to_digits+0x2a4>
mov    $0xffffffff,%eax
mov    %r12d,%ecx
jmp    148e <dd_to_digits+0x28e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0xa,%dl
mov    $0xff,%bl
lea    (%rcx,%rax,1),%esi
add    %bl,0x0(%r13,%rsi,1)
add    %dl,0x0(%r13,%rcx,1)
lea    -0x1(%rcx),%rdx
cmp    $0x1,%rcx
mov    %rdx,%rcx
jle    14a4 <dd_to_digits+0x2a4>
movzbl 0x0(%r13,%rcx,1),%edx
cmp    $0x30,%dl
jl     1470 <dd_to_digits+0x270>
cmp    $0x3a,%dl
jb     1481 <dd_to_digits+0x281>
mov    $0xf6,%dl
mov    $0x1,%bl
jmp    1474 <dd_to_digits+0x274>
cmpb   $0x30,0x0(%r13)
jg     14b7 <dd_to_digits+0x2b7>
lea    0xb84(%rip),%rdi
jmp    13d5 <dd_to_digits+0x1d5>
movslq %r12d,%rax
cmpb   $0x35,0x0(%r13,%rax,1)
jl     150b <dd_to_digits+0x30b>
addb   $0x1,-0x1(%r13,%rax,1)
cmp    $0x2,%r12d
jl     150b <dd_to_digits+0x30b>
lea    -0x1(%rax),%rcx
mov    %ecx,%edx
lea    (%rdx,%r13,1),%rcx
mov    0x0(%r13,%rdx,1),%dl
mov    %r12d,%esi
lea    -0x2(%r12),%edi
add    %r13,%rdi
xor    %ebp,%ebp
cmp    $0x3a,%dl
jl     150b <dd_to_digits+0x30b>
add    $0xf6,%dl
mov    %dl,(%rcx,%rbp,1)
movzbl (%rdi,%rbp,1),%edx
add    $0x1,%dl
mov    %dl,(%rdi,%rbp,1)
add    $0xffffffffffffffff,%rbp
lea    (%rsi,%rbp,1),%ebx
cmp    $0x1,%ebx
jg     14ea <dd_to_digits+0x2ea>
cmpb   $0x3a,0x0(%r13)
jl     1578 <dd_to_digits+0x378>
mov    %r14,0x18(%rsp)
cmp    $0x2,%r12d
jl     1568 <dd_to_digits+0x368>
mov    %r12d,%r14d
xor    %edx,%edx
mov    %r14,%rsi
sub    $0x2,%rsi
mov    $0x0,%ecx
cmovae %rsi,%rcx
add    $0x1,%rcx
cmp    $0x4,%rcx
jae    1586 <dd_to_digits+0x386>
mov    %r14,%rdx
add    $0x1,%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x2(%rdx),%ecx
movzbl 0x0(%r13,%rcx,1),%ecx
mov    %cl,-0x1(%r13,%rdx,1)
add    $0xffffffffffffffff,%rdx
cmp    $0x2,%rdx
ja     1550 <dd_to_digits+0x350>
mov    0x18(%rsp),%r14
add    $0x1,%r14d
movw   $0x3031,0x0(%r13)
movb   $0x0,0x0(%r13,%rax,1)
mov    %r14d,(%r15)
jmp    13da <dd_to_digits+0x1da>
mov    %r14d,%esi
sub    $0x2,%esi
cmovb  %edx,%esi
mov    %r14,%rdi
sub    $0x2,%rdi
cmovae %rdi,%rdx
add    $0xffffffff,%r12d
cmp    %esi,%r12d
jb     153c <dd_to_digits+0x33c>
mov    %rdx,%rsi
shr    $0x20,%rsi
jne    153c <dd_to_digits+0x33c>
lea    (%r14,%r13,1),%rsi
mov    %rsi,%rdi
sub    %rdx,%rdi
cmp    %rsi,%rdi
ja     153c <dd_to_digits+0x33c>
lea    (%r12,%r13,1),%rsi
mov    %rsi,%rdi
sub    %rdx,%rdi
cmp    %rsi,%rdi
ja     153c <dd_to_digits+0x33c>
cmp    $0x2,%r14
mov    $0x2,%edx
cmovb  %r14,%rdx
lea    (%rdx,%r13,1),%rsi
lea    (%r12,%r13,1),%rdi
add    $0x1,%rdi
cmp    %rdi,%rsi
jae    1606 <dd_to_digits+0x406>
lea    (%r14,%r13,1),%rsi
add    $0x1,%rsi
add    %r12,%rdx
sub    %r14,%rdx
add    %r13,%rdx
cmp    %rsi,%rdx
jb     153c <dd_to_digits+0x33c>
mov    $0xffffffff,%r9d
cmp    $0x10,%rcx
jae    1619 <dd_to_digits+0x419>
xor    %edi,%edi
jmp    1703 <dd_to_digits+0x503>
mov    %rcx,%rdi
and    $0xfffffffffffffff0,%rdi
lea    -0x10(%rdi),%rdx
mov    %rdx,%rbp
shr    $0x4,%rbp
add    $0x1,%rbp
mov    %ebp,%r8d
and    $0x3,%r8d
cmp    $0x30,%rdx
jae    1640 <dd_to_digits+0x440>
xor    %edx,%edx
jmp    16bb <dd_to_digits+0x4bb>
mov    %r8,0x10(%rsp)
and    $0xfffffffffffffffc,%rbp
lea    (%r14,%r13,1),%rsi
add    $0xfffffffffffffff1,%rsi
lea    -0x20(%r14,%r9,1),%r10
lea    (%r14,%r9,1),%r11
add    $0xfffffffffffffff0,%r11
lea    (%r14,%r9,1),%r12
add    $0xffffffffffffffd0,%r12
lea    (%r14,%r9,1),%r8
xor    %edx,%edx
lea    (%r8,%rdx,1),%ebx
movups -0xf(%r13,%rbx,1),%xmm0
movups %xmm0,(%rsi,%rdx,1)
lea    (%r11,%rdx,1),%ebx
movups -0xf(%r13,%rbx,1),%xmm0
movups %xmm0,-0x10(%rsi,%rdx,1)
lea    (%r10,%rdx,1),%ebx
movups -0xf(%r13,%rbx,1),%xmm0
movups %xmm0,-0x20(%rsi,%rdx,1)
lea    (%r12,%rdx,1),%ebx
movupd -0xf(%r13,%rbx,1),%xmm0
movupd %xmm0,-0x30(%rsi,%rdx,1)
add    $0xffffffffffffffc0,%rdx
add    $0xfffffffffffffffc,%rbp
jne    166c <dd_to_digits+0x46c>
neg    %rdx
mov    0x10(%rsp),%r8
test   %r8,%r8
je     16f5 <dd_to_digits+0x4f5>
mov    %r14,%rsi
sub    %rdx,%rsi
add    %r13,%rsi
add    $0xfffffffffffffff1,%rsi
lea    (%r14,%r9,1),%rbp
sub    %rdx,%rbp
shl    $0x4,%r8
xor    %edx,%edx
lea    (%rdx,%rbp,1),%ebx
movupd -0xf(%r13,%rbx,1),%xmm0
movupd %xmm0,(%rsi,%rdx,1)
add    $0xfffffffffffffff0,%rdx
mov    %r8,%rbx
add    %rdx,%rbx
jne    16da <dd_to_digits+0x4da>
cmp    %rdi,%rcx
je     1568 <dd_to_digits+0x368>
test   $0xc,%cl
je     175a <dd_to_digits+0x55a>
xor    %esi,%esi
mov    %r14,%rdx
sub    $0x2,%rdx
cmovae %rdx,%rsi
add    $0x1,%rsi
mov    %rsi,%r8
and    $0xfffffffffffffffc,%r8
mov    %r14,%rdx
sub    %r8,%rdx
and    $0xfffffffffffffffc,%rcx
neg    %rcx
neg    %rdi
lea    (%r14,%r13,1),%rbp
add    $0xfffffffffffffffd,%rbp
add    %r14,%r9
lea    (%r9,%rdi,1),%ebx
mov    -0x3(%r13,%rbx,1),%ebx
mov    %ebx,0x0(%rbp,%rdi,1)
add    $0xfffffffffffffffc,%rdi
cmp    %rdi,%rcx
jne    1736 <dd_to_digits+0x536>
cmp    %r8,%rsi
jne    153f <dd_to_digits+0x33f>
jmp    1568 <dd_to_digits+0x368>
sub    %rdi,%r14
jmp    153c <dd_to_digits+0x33c>

LLVM IR (-O0):
@.str = [38 x i8] c"dd_to_digits: cannot compute exponent\00"
@.str.1 = [40 x i8] c"dd_to_digits: nonpositive leading digit\00"
define void @dd_to_digits(double* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca double*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca [2 x double]
%11 = alloca [2 x double]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store double* %0, double** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%15 = load i32, i32* %8
%16 = add nsw i32 %15, 1
store i32 %16, i32* %9
%17 = load double*, double** %5
%18 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%19 = call i32 @dd_abs(double* %17, double* %18)
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 0
%22 = load double, double* %21
%23 = fcmp oeq double %22, 0.000000e+00
br i1 %23, label %24, label %38
24: ; preds = %4
store i32* null, i32** %7
store i32 0, i32* %12
br label %25
25: ; preds = %34, %24
%26 = load i32, i32* %12
%27 = load i32, i32* %8
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %37
29: ; preds = %25
%30 = load i8*, i8** %6
%31 = load i32, i32* %12
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
store i8 48, i8* %33
br label %34
34: ; preds = %29
%35 = load i32, i32* %12
%36 = add nsw i32 %35, 1
store i32 %36, i32* %12
br label %25
37: ; preds = %25
br label %308
38: ; preds = %4
%39 = load double*, double** %5
%40 = getelementptr inbounds double, double* %39, i64 0
%41 = load double, double* %40
%42 = call i32 @fabs(double %41)
%43 = call i32 @log10(i32 %42)
%44 = call i64 @floor(i32 %43)
%45 = trunc i64 %44 to i32
store i32 %45, i32* %14
%46 = load i32, i32* %14
%47 = icmp slt i32 %46, -300
br i1 %47, label %48, label %68
48: ; preds = %38
%49 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
store double 1.000000e+01, double* %49
%50 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 1
store double 0.000000e+00, double* %50
%51 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%52 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%53 = call i32 @dd_npwr(double* %51, i32 300, double* %52)
%54 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%55 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%56 = call i32 @dd_mlt(double* %54, double* %55)
%57 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
store double 1.000000e+01, double* %57
%58 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 1
store double 0.000000e+00, double* %58
%59 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%60 = load i32, i32* %14
%61 = add nsw i32 %60, 300
%62 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%63 = call i32 @dd_npwr(double* %59, i32 %61, double* %62)
%64 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%65 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%66 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%67 = call i32 @dd_div(double* %64, double* %65, double* %66)
br label %98
68: ; preds = %38
%69 = load i32, i32* %14
%70 = icmp sgt i32 %69, 300
br i1 %70, label %71, label %86
71: ; preds = %68
%72 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%73 = call i32 @dd_ldexp(double* %72, i32 -53)
%74 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
store double 1.000000e+01, double* %74
%75 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 1
store double 0.000000e+00, double* %75
%76 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%77 = load i32, i32* %14
%78 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%79 = call i32 @dd_npwr(double* %76, i32 %77, double* %78)
%80 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%81 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%82 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%83 = call i32 @dd_div(double* %80, double* %81, double* %82)
%84 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%85 = call i32 @dd_ldexp(double* %84, i32 53)
br label %97
86: ; preds = %68
%87 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
store double 1.000000e+01, double* %87
%88 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 1
store double 0.000000e+00, double* %88
%89 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%90 = load i32, i32* %14
%91 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%92 = call i32 @dd_npwr(double* %89, i32 %90, double* %91)
%93 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%94 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0, i64 0
%95 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%96 = call i32 @dd_div(double* %93, double* %94, double* %95)
br label %97
97: ; preds = %86, %71
br label %98
98: ; preds = %97, %48
%99 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%100 = call i32 @dd_gt_dd_d(double* %99, double 1.000000e+01)
%101 = icmp eq i32 %100, 1
br i1 %101, label %102, label %108
102: ; preds = %98
%103 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%104 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%105 = call i32 @dd_div_dd_d(double* %103, double 1.000000e+01, double* %104)
%106 = load i32, i32* %14
%107 = add nsw i32 %106, 1
store i32 %107, i32* %14
br label %118
108: ; preds = %98
%109 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%110 = call i32 @dd_lt_dd_d(double* %109, double 1.000000e+00)
%111 = icmp eq i32 %110, 1
br i1 %111, label %112, label %117
112: ; preds = %108
%113 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%114 = call i32 @dd_mlt_d(double* %113, double 1.000000e+01)
%115 = load i32, i32* %14
%116 = add nsw i32 %115, -1
store i32 %116, i32* %14
br label %117
117: ; preds = %112, %108
br label %118
118: ; preds = %117, %102
%119 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%120 = call i32 @dd_geq_dd_d(double* %119, double 1.000000e+01)
%121 = icmp eq i32 %120, 1
br i1 %121, label %126, label %122
122: ; preds = %118
%123 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%124 = call i32 @dd_lt_dd_d(double* %123, double 1.000000e+00)
%125 = icmp eq i32 %124, 1
br i1 %125, label %126, label %128
126: ; preds = %122, %118
%127 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %308
128: ; preds = %122
store i32 0, i32* %12
br label %129
129: ; preds = %150, %128
%130 = load i32, i32* %12
%131 = load i32, i32* %9
%132 = icmp slt i32 %130, %131
br i1 %132, label %133, label %153
133: ; preds = %129
%134 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%135 = load double, double* %134
%136 = fptosi double %135 to i32
store i32 %136, i32* %13
%137 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%138 = load i32, i32* %13
%139 = sitofp i32 %138 to double
%140 = call i32 @dd_dec_d(double* %137, double %139)
%141 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
%142 = call i32 @dd_mlt_d(double* %141, double 1.000000e+01)
%143 = load i32, i32* %13
%144 = add nsw i32 %143, 48
%145 = trunc i32 %144 to i8
%146 = load i8*, i8** %6
%147 = load i32, i32* %12
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8, i8* %146, i64 %148
store i8 %145, i8* %149
br label %150
150: ; preds = %133
%151 = load i32, i32* %12
%152 = add nsw i32 %151, 1
store i32 %152, i32* %12
br label %129
153: ; preds = %129
%154 = load i32, i32* %9
%155 = sub nsw i32 %154, 1
store i32 %155, i32* %12
br label %156
156: ; preds = %209, %153
%157 = load i32, i32* %12
%158 = icmp sgt i32 %157, 0
br i1 %158, label %159, label %212
159: ; preds = %156
%160 = load i8*, i8** %6
%161 = load i32, i32* %12
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %160, i64 %162
%164 = load i8, i8* %163
%165 = sext i8 %164 to i32
%166 = icmp slt i32 %165, 48
br i1 %166, label %167, label %183
167: ; preds = %159
%168 = load i8*, i8** %6
%169 = load i32, i32* %12
%170 = sub nsw i32 %169, 1
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds i8, i8* %168, i64 %171
%173 = load i8, i8* %172
%174 = add i8 %173, -1
store i8 %174, i8* %172
%175 = load i8*, i8** %6
%176 = load i32, i32* %12
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i8, i8* %175, i64 %177
%179 = load i8, i8* %178
%180 = sext i8 %179 to i32
%181 = add nsw i32 %180, 10
%182 = trunc i32 %181 to i8
store i8 %182, i8* %178
br label %208
183: ; preds = %159
%184 = load i8*, i8** %6
%185 = load i32, i32* %12
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i8, i8* %184, i64 %186
%188 = load i8, i8* %187
%189 = sext i8 %188 to i32
%190 = icmp sgt i32 %189, 57
br i1 %190, label %191, label %207
191: ; preds = %183
%192 = load i8*, i8** %6
%193 = load i32, i32* %12
%194 = sub nsw i32 %193, 1
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8, i8* %192, i64 %195
%197 = load i8, i8* %196
%198 = add i8 %197, 1
store i8 %198, i8* %196
%199 = load i8*, i8** %6
%200 = load i32, i32* %12
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds i8, i8* %199, i64 %201
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = sub nsw i32 %204, 10
%206 = trunc i32 %205 to i8
store i8 %206, i8* %202
br label %207
207: ; preds = %191, %183
br label %208
208: ; preds = %207, %167
br label %209
209: ; preds = %208
%210 = load i32, i32* %12
%211 = add nsw i32 %210, -1
store i32 %211, i32* %12
br label %156
212: ; preds = %156
%213 = load i8*, i8** %6
%214 = getelementptr inbounds i8, i8* %213, i64 0
%215 = load i8, i8* %214
%216 = sext i8 %215 to i32
%217 = icmp sle i32 %216, 48
br i1 %217, label %218, label %220
218: ; preds = %212
%219 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %308
220: ; preds = %212
%221 = load i8*, i8** %6
%222 = load i32, i32* %9
%223 = sub nsw i32 %222, 1
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds i8, i8* %221, i64 %224
%226 = load i8, i8* %225
%227 = sext i8 %226 to i32
%228 = icmp sge i32 %227, 53
br i1 %228, label %229, label %269
229: ; preds = %220
%230 = load i8*, i8** %6
%231 = load i32, i32* %9
%232 = sub nsw i32 %231, 2
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds i8, i8* %230, i64 %233
%235 = load i8, i8* %234
%236 = add i8 %235, 1
store i8 %236, i8* %234
%237 = load i32, i32* %9
%238 = sub nsw i32 %237, 2
store i32 %238, i32* %12
br label %239
239: ; preds = %252, %229
%240 = load i32, i32* %12
%241 = icmp sgt i32 %240, 0
br i1 %241, label %242, label %250
242: ; preds = %239
%243 = load i8*, i8** %6
%244 = load i32, i32* %12
%245 = sext i32 %244 to i64
%246 = getelementptr inbounds i8, i8* %243, i64 %245
%247 = load i8, i8* %246
%248 = sext i8 %247 to i32
%249 = icmp sgt i32 %248, 57
br label %250
250: ; preds = %242, %239
%251 = phi i1 [ false, %239 ], [ %249, %242 ]
br i1 %251, label %252, label %268
252: ; preds = %250
%253 = load i8*, i8** %6
%254 = load i32, i32* %12
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds i8, i8* %253, i64 %255
%257 = load i8, i8* %256
%258 = sext i8 %257 to i32
%259 = sub nsw i32 %258, 10
%260 = trunc i32 %259 to i8
store i8 %260, i8* %256
%261 = load i8*, i8** %6
%262 = load i32, i32* %12
%263 = add nsw i32 %262, -1
store i32 %263, i32* %12
%264 = sext i32 %263 to i64
%265 = getelementptr inbounds i8, i8* %261, i64 %264
%266 = load i8, i8* %265
%267 = add i8 %266, 1
store i8 %267, i8* %265
br label %239
268: ; preds = %250
br label %269
269: ; preds = %268, %220
%270 = load i8*, i8** %6
%271 = getelementptr inbounds i8, i8* %270, i64 0
%272 = load i8, i8* %271
%273 = sext i8 %272 to i32
%274 = icmp sgt i32 %273, 57
br i1 %274, label %275, label %301
275: ; preds = %269
%276 = load i32, i32* %14
%277 = add nsw i32 %276, 1
store i32 %277, i32* %14
%278 = load i32, i32* %8
store i32 %278, i32* %12
br label %279
279: ; preds = %293, %275
%280 = load i32, i32* %12
%281 = icmp sge i32 %280, 2
br i1 %281, label %282, label %296
282: ; preds = %279
%283 = load i8*, i8** %6
%284 = load i32, i32* %12
%285 = sub nsw i32 %284, 1
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds i8, i8* %283, i64 %286
%288 = load i8, i8* %287
%289 = load i8*, i8** %6
%290 = load i32, i32* %12
%291 = sext i32 %290 to i64
%292 = getelementptr inbounds i8, i8* %289, i64 %291
store i8 %288, i8* %292
br label %293
293: ; preds = %282
%294 = load i32, i32* %12
%295 = add nsw i32 %294, -1
store i32 %295, i32* %12
br label %279
296: ; preds = %279
%297 = load i8*, i8** %6
%298 = getelementptr inbounds i8, i8* %297, i64 0
store i8 49, i8* %298
%299 = load i8*, i8** %6
%300 = getelementptr inbounds i8, i8* %299, i64 1
store i8 48, i8* %300
br label %301
301: ; preds = %296, %269
%302 = load i8*, i8** %6
%303 = load i32, i32* %8
%304 = sext i32 %303 to i64
%305 = getelementptr inbounds i8, i8* %302, i64 %304
store i8 0, i8* %305
%306 = load i32, i32* %14
%307 = load i32*, i32** %7
store i32 %306, i32* %307
br label %308
308: ; preds = %301, %218, %126, %37
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"dd_to_digits: cannot compute exponent\00"
@.str.1 = [40 x i8] c"dd_to_digits: nonpositive leading digit\00"
define void @dd_to_digits(double* %0, i8* nocapture %1, i32* nocapture writeonly %2, i32 %3) {
%5 = alloca [2 x double]
%6 = alloca <2 x double>
%7 = bitcast [2 x double]* %5 to i8*
%8 = bitcast <2 x double>* %6 to i8*
%9 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
%10 = call i32 @dd_abs(double* %0, double* %9)
%11 = load double, double* %0
%12 = fcmp oeq double %11, 0.000000e+00
br i1 %12, label %13, label %17
13: ; preds = %4
%14 = icmp sgt i32 %3, 0
br i1 %14, label %15, label %308
15: ; preds = %13
%16 = zext i32 %3 to i64
br label %308
17: ; preds = %4
%18 = call i32 @fabs(double %11)
%19 = call i32 @log10(i32 %18)
%20 = call i64 @floor(i32 %19)
%21 = trunc i64 %20 to i32
%22 = icmp slt i32 %21, -300
br i1 %22, label %23, label %30
23: ; preds = %17
%24 = getelementptr inbounds <2 x double>, <2 x double>* %6, i64 0, i64 0
store <2 x double> <double 1.000000e+01, double 0.000000e+00>, <2 x double>* %6
%25 = call i32 @dd_npwr(double* %24, i32 300, double* %24)
%26 = call i32 @dd_mlt(double* %9, double* %24)
store <2 x double> <double 1.000000e+01, double 0.000000e+00>, <2 x double>* %6
%27 = add nuw nsw i32 %21, 300
%28 = call i32 @dd_npwr(double* %24, i32 %27, double* %24)
%29 = call i32 @dd_div(double* %9, double* %24, double* %9)
br label %42
30: ; preds = %17
%31 = icmp sgt i32 %21, 300
br i1 %31, label %32, label %38
32: ; preds = %30
%33 = call i32 @dd_ldexp(double* %9, i32 -53)
%34 = getelementptr inbounds <2 x double>, <2 x double>* %6, i64 0, i64 0
store <2 x double> <double 1.000000e+01, double 0.000000e+00>, <2 x double>* %6
%35 = call i32 @dd_npwr(double* %34, i32 %21, double* %34)
%36 = call i32 @dd_div(double* %9, double* %34, double* %9)
%37 = call i32 @dd_ldexp(double* %9, i32 53)
br label %42
38: ; preds = %30
%39 = getelementptr inbounds <2 x double>, <2 x double>* %6, i64 0, i64 0
store <2 x double> <double 1.000000e+01, double 0.000000e+00>, <2 x double>* %6
%40 = call i32 @dd_npwr(double* %39, i32 %21, double* %39)
%41 = call i32 @dd_div(double* %9, double* %39, double* %9)
br label %42
42: ; preds = %32, %38, %23
%43 = call i32 @dd_gt_dd_d(double* %9, double 1.000000e+01)
%44 = icmp eq i32 %43, 1
br i1 %44, label %45, label %48
45: ; preds = %42
%46 = call i32 @dd_div_dd_d(double* %9, double 1.000000e+01, double* %9)
%47 = add nsw i32 %21, 1
br label %54
48: ; preds = %42
%49 = call i32 @dd_lt_dd_d(double* %9, double 1.000000e+00)
%50 = icmp eq i32 %49, 1
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = call i32 @dd_mlt_d(double* %9, double 1.000000e+01)
%53 = add nsw i32 %21, -1
br label %54
54: ; preds = %48, %51, %45
%55 = phi i32 [ %47, %45 ], [ %53, %51 ], [ %21, %48 ]
%56 = call i32 @dd_geq_dd_d(double* %9, double 1.000000e+01)
%57 = icmp eq i32 %56, 1
br i1 %57, label %66, label %58
58: ; preds = %54
%59 = call i32 @dd_lt_dd_d(double* %9, double 1.000000e+00)
%60 = icmp eq i32 %59, 1
br i1 %60, label %66, label %61
61: ; preds = %58
%62 = icmp slt i32 %3, 0
br i1 %62, label %104, label %63
63: ; preds = %61
%64 = add nuw i32 %3, 1
%65 = zext i32 %64 to i64
br label %72
66: ; preds = %58, %54
%67 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %308
68: ; preds = %72
%69 = icmp sgt i32 %3, 0
br i1 %69, label %70, label %104
70: ; preds = %68
%71 = zext i32 %3 to i64
br label %84
72: ; preds = %63, %72
%73 = phi i64 [ 0, %63 ], [ %82, %72 ]
%74 = load double, double* %9
%75 = fptosi double %74 to i32
%76 = sitofp i32 %75 to double
%77 = call i32 @dd_dec_d(double* %9, double %76)
%78 = call i32 @dd_mlt_d(double* %9, double 1.000000e+01)
%79 = trunc i32 %75 to i8
%80 = add i8 %79, 48
%81 = getelementptr inbounds i8, i8* %1, i64 %73
store i8 %80, i8* %81
%82 = add nuw nsw i64 %73, 1
%83 = icmp eq i64 %82, %65
br i1 %83, label %68, label %72
84: ; preds = %70, %101
%85 = phi i64 [ %71, %70 ], [ %102, %101 ]
%86 = getelementptr inbounds i8, i8* %1, i64 %85
%87 = load i8, i8* %86
%88 = icmp slt i8 %87, 48
br i1 %88, label %91, label %89
89: ; preds = %84
%90 = icmp ugt i8 %87, 57
br i1 %90, label %91, label %101
91: ; preds = %89, %84
%92 = phi i8 [ -1, %84 ], [ 1, %89 ]
%93 = phi i8 [ 10, %84 ], [ -10, %89 ]
%94 = add nuw i64 %85, 4294967295
%95 = and i64 %94, 4294967295
%96 = getelementptr inbounds i8, i8* %1, i64 %95
%97 = load i8, i8* %96
%98 = add i8 %97, %92
store i8 %98, i8* %96
%99 = load i8, i8* %86
%100 = add i8 %99, %93
store i8 %100, i8* %86
br label %101
101: ; preds = %91, %89
%102 = add nsw i64 %85, -1
%103 = icmp sgt i64 %85, 1
br i1 %103, label %84, label %104
104: ; preds = %101, %61, %68
%105 = load i8, i8* %1
%106 = icmp slt i8 %105, 49
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %308
109: ; preds = %104
%110 = sext i32 %3 to i64
%111 = getelementptr inbounds i8, i8* %1, i64 %110
%112 = load i8, i8* %111
%113 = icmp sgt i8 %112, 52
br i1 %113, label %114, label %139
114: ; preds = %109
%115 = add nsw i32 %3, -1
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %1, i64 %116
%118 = load i8, i8* %117
%119 = add i8 %118, 1
store i8 %119, i8* %117
%120 = icmp sgt i32 %3, 1
br i1 %120, label %121, label %139
121: ; preds = %114
%122 = zext i32 %115 to i64
%123 = getelementptr inbounds i8, i8* %1, i64 %122
%124 = load i8, i8* %123
br label %125
125: ; preds = %121, %129
%126 = phi i8 [ %137, %129 ], [ %124, %121 ]
%127 = phi i32 [ %133, %129 ], [ %115, %121 ]
%128 = icmp sgt i8 %126, 57
br i1 %128, label %129, label %139
129: ; preds = %125
%130 = zext i32 %127 to i64
%131 = getelementptr inbounds i8, i8* %1, i64 %130
%132 = add nsw i8 %126, -10
store i8 %132, i8* %131
%133 = add nsw i32 %127, -1
%134 = zext i32 %133 to i64
%135 = getelementptr inbounds i8, i8* %1, i64 %134
%136 = load i8, i8* %135
%137 = add i8 %136, 1
store i8 %137, i8* %135
%138 = icmp sgt i32 %127, 1
br i1 %138, label %125, label %139
139: ; preds = %129, %125, %114, %109
%140 = load i8, i8* %1
%141 = icmp sgt i8 %140, 57
br i1 %141, label %142, label %306
142: ; preds = %139
%143 = add nsw i32 %55, 1
%144 = icmp sgt i32 %3, 1
br i1 %144, label %145, label %304
145: ; preds = %142
%146 = zext i32 %3 to i64
%147 = add nuw nsw i64 %146, 1
%148 = call i64 @llvm.umin.i64(i64 %146, i64 2)
%149 = sub nsw i64 %147, %148
%150 = icmp ult i64 %149, 4
br i1 %150, label %294, label %151
151: ; preds = %145
%152 = call i64 @llvm.umin.i64(i64 %146, i64 2)
%153 = sub nsw i64 %146, %152
%154 = add i32 %3, -1
%155 = trunc i64 %153 to i32
%156 = icmp ult i32 %154, %155
%157 = icmp ugt i64 %153, 4294967295
%158 = or i1 %156, %157
%159 = getelementptr i8, i8* %1, i64 %146
%160 = sub nsw i64 0, %153
%161 = getelementptr i8, i8* %159, i64 %160
%162 = icmp ugt i8* %161, %159
%163 = zext i32 %154 to i64
%164 = getelementptr i8, i8* %1, i64 %163
%165 = sub nsw i64 0, %153
%166 = getelementptr i8, i8* %164, i64 %165
%167 = icmp ugt i8* %166, %164
%168 = or i1 %158, %162
%169 = or i1 %168, %167
br i1 %169, label %294, label %170
170: ; preds = %151
%171 = call i64 @llvm.umin.i64(i64 %146, i64 2)
%172 = getelementptr i8, i8* %1, i64 %171
%173 = add nuw nsw i64 %146, 1
%174 = getelementptr i8, i8* %1, i64 %173
%175 = add i32 %3, -1
%176 = zext i32 %175 to i64
%177 = add nuw nsw i64 %171, %176
%178 = sub nsw i64 %177, %146
%179 = getelementptr i8, i8* %1, i64 %178
%180 = add nuw nsw i64 %176, 1
%181 = getelementptr i8, i8* %1, i64 %180
%182 = icmp ult i8* %172, %181
%183 = icmp ult i8* %179, %174
%184 = and i1 %182, %183
br i1 %184, label %294, label %185
185: ; preds = %170
%186 = icmp ult i64 %149, 16
br i1 %186, label %271, label %187
187: ; preds = %185
%188 = and i64 %149, -16
%189 = add nsw i64 %188, -16
%190 = lshr exact i64 %189, 4
%191 = add nuw nsw i64 %190, 1
%192 = and i64 %191, 3
%193 = icmp ult i64 %189, 48
br i1 %193, label %245, label %194
194: ; preds = %187
%195 = and i64 %191, 2305843009213693948
%196 = getelementptr inbounds i8, i8* %1, i64 -15
%197 = getelementptr inbounds i8, i8* %1, i64 -15
%198 = getelementptr inbounds i8, i8* %1, i64 -15
%199 = getelementptr inbounds i8, i8* %1, i64 -15
%200 = getelementptr inbounds i8, i8* %1, i64 -15
%201 = getelementptr inbounds i8, i8* %1, i64 -15
%202 = getelementptr inbounds i8, i8* %1, i64 -15
%203 = getelementptr inbounds i8, i8* %1, i64 -15
br label %204
204: ; preds = %204, %194
%205 = phi i64 [ 0, %194 ], [ %242, %204 ]
%206 = phi i64 [ 0, %194 ], [ %243, %204 ]
%207 = sub i64 %146, %205
%208 = add i64 %207, 4294967295
%209 = and i64 %208, 4294967295
%210 = getelementptr inbounds i8, i8* %196, i64 %209
%211 = bitcast i8* %210 to <16 x i8>*
%212 = load <16 x i8>, <16 x i8>* %211
%213 = getelementptr inbounds i8, i8* %197, i64 %207
%214 = bitcast i8* %213 to <16 x i8>*
store <16 x i8> %212, <16 x i8>* %214
%215 = or i64 %205, 16
%216 = sub i64 %146, %215
%217 = add i64 %216, 4294967295
%218 = and i64 %217, 4294967295
%219 = getelementptr inbounds i8, i8* %198, i64 %218
%220 = bitcast i8* %219 to <16 x i8>*
%221 = load <16 x i8>, <16 x i8>* %220
%222 = getelementptr inbounds i8, i8* %199, i64 %216
%223 = bitcast i8* %222 to <16 x i8>*
store <16 x i8> %221, <16 x i8>* %223
%224 = or i64 %205, 32
%225 = sub i64 %146, %224
%226 = add i64 %225, 4294967295
%227 = and i64 %226, 4294967295
%228 = getelementptr inbounds i8, i8* %200, i64 %227
%229 = bitcast i8* %228 to <16 x i8>*
%230 = load <16 x i8>, <16 x i8>* %229
%231 = getelementptr inbounds i8, i8* %201, i64 %225
%232 = bitcast i8* %231 to <16 x i8>*
store <16 x i8> %230, <16 x i8>* %232
%233 = or i64 %205, 48
%234 = sub i64 %146, %233
%235 = add i64 %234, 4294967295
%236 = and i64 %235, 4294967295
%237 = getelementptr inbounds i8, i8* %202, i64 %236
%238 = bitcast i8* %237 to <16 x i8>*
%239 = load <16 x i8>, <16 x i8>* %238
%240 = getelementptr inbounds i8, i8* %203, i64 %234
%241 = bitcast i8* %240 to <16 x i8>*
store <16 x i8> %239, <16 x i8>* %241
%242 = add nuw i64 %205, 64
%243 = add i64 %206, 4
%244 = icmp eq i64 %243, %195
br i1 %244, label %245, label %204
245: ; preds = %204, %187
%246 = phi i64 [ 0, %187 ], [ %242, %204 ]
%247 = icmp eq i64 %192, 0
br i1 %247, label %265, label %248
248: ; preds = %245
%249 = getelementptr inbounds i8, i8* %1, i64 -15
%250 = getelementptr inbounds i8, i8* %1, i64 -15
br label %251
251: ; preds = %251, %248
%252 = phi i64 [ %246, %248 ], [ %262, %251 ]
%253 = phi i64 [ 0, %248 ], [ %263, %251 ]
%254 = sub i64 %146, %252
%255 = add i64 %254, 4294967295
%256 = and i64 %255, 4294967295
%257 = getelementptr inbounds i8, i8* %249, i64 %256
%258 = bitcast i8* %257 to <16 x i8>*
%259 = load <16 x i8>, <16 x i8>* %258
%260 = getelementptr inbounds i8, i8* %250, i64 %254
%261 = bitcast i8* %260 to <16 x i8>*
store <16 x i8> %259, <16 x i8>* %261
%262 = add nuw i64 %252, 16
%263 = add i64 %253, 1
%264 = icmp eq i64 %263, %192
br i1 %264, label %265, label %251
265: ; preds = %251, %245
%266 = icmp eq i64 %149, %188
br i1 %266, label %304, label %267
267: ; preds = %265
%268 = sub nsw i64 %146, %188
%269 = and i64 %149, 12
%270 = icmp eq i64 %269, 0
br i1 %270, label %294, label %271
271: ; preds = %185, %267
%272 = phi i64 [ %188, %267 ], [ 0, %185 ]
%273 = add nuw nsw i64 %146, 1
%274 = call i64 @llvm.umin.i64(i64 %146, i64 2)
%275 = sub nsw i64 %273, %274
%276 = and i64 %275, -4
%277 = sub nsw i64 %146, %276
%278 = getelementptr inbounds i8, i8* %1, i64 -3
%279 = getelementptr inbounds i8, i8* %1, i64 -3
br label %280
280: ; preds = %280, %271
%281 = phi i64 [ %272, %271 ], [ %290, %280 ]
%282 = sub i64 %146, %281
%283 = add i64 %282, 4294967295
%284 = and i64 %283, 4294967295
%285 = getelementptr inbounds i8, i8* %278, i64 %284
%286 = bitcast i8* %285 to <4 x i8>*
%287 = load <4 x i8>, <4 x i8>* %286
%288 = getelementptr inbounds i8, i8* %279, i64 %282
%289 = bitcast i8* %288 to <4 x i8>*
store <4 x i8> %287, <4 x i8>* %289
%290 = add nuw i64 %281, 4
%291 = icmp eq i64 %290, %276
br i1 %291, label %292, label %280
292: ; preds = %280
%293 = icmp eq i64 %275, %276
br i1 %293, label %304, label %294
294: ; preds = %170, %151, %145, %267, %292
%295 = phi i64 [ %146, %145 ], [ %146, %170 ], [ %146, %151 ], [ %268, %267 ], [ %277, %292 ]
br label %296
296: ; preds = %294, %296
%297 = phi i64 [ %298, %296 ], [ %295, %294 ]
%298 = add nsw i64 %297, -1
%299 = and i64 %298, 4294967295
%300 = getelementptr inbounds i8, i8* %1, i64 %299
%301 = load i8, i8* %300
%302 = getelementptr inbounds i8, i8* %1, i64 %297
store i8 %301, i8* %302
%303 = icmp ugt i64 %297, 2
br i1 %303, label %296, label %304
304: ; preds = %296, %265, %292, %142
store i8 49, i8* %1
%305 = getelementptr inbounds i8, i8* %1, i64 1
store i8 48, i8* %305
br label %306
306: ; preds = %304, %139
%307 = phi i32 [ %143, %304 ], [ %55, %139 ]
store i8 0, i8* %111
store i32 %307, i32* %2
br label %308
308: ; preds = %15, %13, %306, %107, %66
ret void
}