void fmtfp(char *buffer, unsigned int *currlen, unsigned int maxlen,
           double fvalue, int min, int max, int flags) {
  char signvalue = 0;
  double ufvalue;
  char iconvert[311];
  char fconvert[311];
  int iplace = 0;
  int fplace = 0;
  int padlen = 0;
  int zpadlen = 0;
  int caps = 0;
  int index;
  double intpart;
  double fracpart;
  double temp;
  if (max < 0)
    max = 6;
  ufvalue = abs_val(fvalue);
  if (fvalue < 0) {
    signvalue = '-';
  } else {
    if (flags & (1 << 1)) {
      signvalue = '+';
    } else {
      if (flags & (1 << 2))
        signvalue = ' ';
    }
  }
  if (max > 16)
    max = 16;
  temp = ufvalue;
  my_modf(temp, &intpart);
  fracpart = ROUND((POW10(max)) * (ufvalue - intpart));
  if (fracpart >= POW10(max)) {
    intpart++;
    fracpart -= POW10(max);
  }
  do {
    temp = intpart * 0.1;
    my_modf(temp, &intpart);
    index = (int)((temp - intpart + 0.05) * 10.0);
    iconvert[iplace++] =
        (caps ? "0123456789ABCDEF" : "0123456789abcdef")[index];
  } while (intpart && (iplace < 311));
  if (iplace == 311)
    iplace--;
  iconvert[iplace] = 0;
  if (fracpart) {
    do {
      temp = fracpart * 0.1;
      my_modf(temp, &fracpart);
      index = (int)((temp - fracpart + 0.05) * 10.0);
      fconvert[fplace++] =
          (caps ? "0123456789ABCDEF" : "0123456789abcdef")[index];
    } while (fracpart && (fplace < 311));
    if (fplace == 311)
      fplace--;
  }
  fconvert[fplace] = 0;
  padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
  zpadlen = max - fplace;
  if (zpadlen < 0)
    zpadlen = 0;
  if (padlen < 0)
    padlen = 0;
  if (flags & (1 << 0))
    padlen = -padlen;
  if ((flags & (1 << 4)) && (padlen > 0)) {
    if (signvalue) {
      dopr_outch(buffer, currlen, maxlen, signvalue);
      --padlen;
      signvalue = 0;
    }
    while (padlen > 0) {
      dopr_outch(buffer, currlen, maxlen, '0');
      --padlen;
    }
  }
  while (padlen > 0) {
    dopr_outch(buffer, currlen, maxlen, ' ');
    --padlen;
  }
  if (signvalue)
    dopr_outch(buffer, currlen, maxlen, signvalue);
  while (iplace > 0)
    dopr_outch(buffer, currlen, maxlen, iconvert[--iplace]);
  if (max > 0) {
    dopr_outch(buffer, currlen, maxlen, '.');
    while (zpadlen > 0) {
      dopr_outch(buffer, currlen, maxlen, '0');
      --zpadlen;
    }
    while (fplace > 0)
      dopr_outch(buffer, currlen, maxlen, fconvert[--fplace]);
  }
  while (padlen < 0) {
    dopr_outch(buffer, currlen, maxlen, ' ');
    ++padlen;
  }
}


x86 assembly (clang, -O0):
<fmtfp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movb   $0x0,-0x2d(%rbp)
movl   $0x0,-0x2b4(%rbp)
movl   $0x0,-0x2b8(%rbp)
movl   $0x0,-0x2bc(%rbp)
movl   $0x0,-0x2c0(%rbp)
movl   $0x0,-0x2c4(%rbp)
cmpl   $0x0,-0x28(%rbp)
jge    11bd <fmtfp+0x6d>
movl   $0x6,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    $0x1,%al
call   1040 <abs_val@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11e9 <fmtfp+0x99>
movb   $0x2d,-0x2d(%rbp)
jmp    121e <fmtfp+0xce>
mov    -0x2c(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1201 <fmtfp+0xb1>
movb   $0x2b,-0x2d(%rbp)
jmp    1219 <fmtfp+0xc9>
mov    -0x2c(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1214 <fmtfp+0xc4>
movb   $0x20,-0x2d(%rbp)
jmp    1219 <fmtfp+0xc9>
jmp    121e <fmtfp+0xce>
cmpl   $0x10,-0x28(%rbp)
jle    122f <fmtfp+0xdf>
movl   $0x10,-0x28(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x2e0(%rbp)
ff
movsd  -0x2e0(%rbp),%xmm0
ff
lea    -0x2d0(%rbp),%rdi
mov    $0x1,%al
call   1060 <my_modf@plt>
mov    -0x28(%rbp),%edi
mov    $0x0,%al
call   1030 <POW10@plt>
cvtsi2sd %eax,%xmm0
movsd  -0x38(%rbp),%xmm1
subsd  -0x2d0(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
mov    $0x1,%al
call   1050 <ROUND@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x2d8(%rbp)
ff
movsd  -0x2d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x2e8(%rbp)
ff
mov    -0x28(%rbp),%edi
mov    $0x0,%al
call   1030 <POW10@plt>
movsd  -0x2e8(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jb     12ee <fmtfp+0x19e>
movsd  0xd44(%rip),%xmm0
addsd  -0x2d0(%rbp),%xmm0
ff
movsd  %xmm0,-0x2d0(%rbp)
ff
mov    -0x28(%rbp),%edi
mov    $0x0,%al
call   1030 <POW10@plt>
cvtsi2sd %eax,%xmm1
movsd  -0x2d8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x2d8(%rbp)
ff
jmp    12f3 <fmtfp+0x1a3>
movsd  0xd1d(%rip),%xmm0
mulsd  -0x2d0(%rbp),%xmm0
ff
movsd  %xmm0,-0x2e0(%rbp)
ff
movsd  -0x2e0(%rbp),%xmm0
ff
lea    -0x2d0(%rbp),%rdi
mov    $0x1,%al
call   1060 <my_modf@plt>
movsd  -0x2e0(%rbp),%xmm0
ff
subsd  -0x2d0(%rbp),%xmm0
ff
movsd  0xcd7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xcc3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x2c8(%rbp)
mov    -0x2c4(%rbp),%edx
lea    0xcd1(%rip),%rax
lea    0xcb9(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
movslq -0x2c8(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x2b4(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x2b4(%rbp)
cltq
mov    %cl,-0x170(%rbp,%rax,1)
movsd  -0x2d0(%rbp),%xmm0
ff
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2e9(%rbp)
jne    13ba <fmtfp+0x26a>
jp     13ba <fmtfp+0x26a>
jmp    13cd <fmtfp+0x27d>
cmpl   $0x137,-0x2b4(%rbp)
setl   %al
mov    %al,-0x2e9(%rbp)
mov    -0x2e9(%rbp),%al
test   $0x1,%al
jne    12f3 <fmtfp+0x1a3>
cmpl   $0x137,-0x2b4(%rbp)
jne    13fa <fmtfp+0x2aa>
mov    -0x2b4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2b4(%rbp)
movslq -0x2b4(%rbp),%rax
movb   $0x0,-0x170(%rbp,%rax,1)
movsd  -0x2d8(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1429 <fmtfp+0x2d9>
jp     1429 <fmtfp+0x2d9>
jmp    153a <fmtfp+0x3ea>
jmp    142e <fmtfp+0x2de>
movsd  0xbe2(%rip),%xmm0
mulsd  -0x2d8(%rbp),%xmm0
ff
movsd  %xmm0,-0x2e0(%rbp)
ff
movsd  -0x2e0(%rbp),%xmm0
ff
lea    -0x2d8(%rbp),%rdi
mov    $0x1,%al
call   1060 <my_modf@plt>
movsd  -0x2e0(%rbp),%xmm0
ff
subsd  -0x2d8(%rbp),%xmm0
ff
movsd  0xb9c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xb88(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x2c8(%rbp)
mov    -0x2c4(%rbp),%edx
lea    0xb96(%rip),%rax
lea    0xb7e(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
movslq -0x2c8(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x2b8(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x2b8(%rbp)
cltq
mov    %cl,-0x2b0(%rbp,%rax,1)
movsd  -0x2d8(%rbp),%xmm0
ff
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2ea(%rbp)
jne    14f5 <fmtfp+0x3a5>
jp     14f5 <fmtfp+0x3a5>
jmp    1508 <fmtfp+0x3b8>
cmpl   $0x137,-0x2b8(%rbp)
setl   %al
mov    %al,-0x2ea(%rbp)
mov    -0x2ea(%rbp),%al
test   $0x1,%al
jne    142e <fmtfp+0x2de>
cmpl   $0x137,-0x2b8(%rbp)
jne    1535 <fmtfp+0x3e5>
mov    -0x2b8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2b8(%rbp)
jmp    153a <fmtfp+0x3ea>
movslq -0x2b8(%rbp),%rax
movb   $0x0,-0x2b0(%rbp,%rax,1)
mov    -0x24(%rbp),%eax
sub    -0x2b4(%rbp),%eax
sub    -0x28(%rbp),%eax
sub    $0x1,%eax
movsbl -0x2d(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x2bc(%rbp)
mov    -0x28(%rbp),%eax
sub    -0x2b8(%rbp),%eax
mov    %eax,-0x2c0(%rbp)
cmpl   $0x0,-0x2c0(%rbp)
jge    1597 <fmtfp+0x447>
movl   $0x0,-0x2c0(%rbp)
cmpl   $0x0,-0x2bc(%rbp)
jge    15ae <fmtfp+0x45e>
movl   $0x0,-0x2bc(%rbp)
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     15cb <fmtfp+0x47b>
xor    %eax,%eax
sub    -0x2bc(%rbp),%eax
mov    %eax,-0x2bc(%rbp)
mov    -0x2c(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     165c <fmtfp+0x50c>
cmpl   $0x0,-0x2bc(%rbp)
jle    165c <fmtfp+0x50c>
cmpb   $0x0,-0x2d(%rbp)
je     161a <fmtfp+0x4ca>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsbl -0x2d(%rbp),%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
mov    -0x2bc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2bc(%rbp)
movb   $0x0,-0x2d(%rbp)
jmp    161f <fmtfp+0x4cf>
cmpl   $0x0,-0x2bc(%rbp)
jle    1657 <fmtfp+0x507>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x30,%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
mov    -0x2bc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2bc(%rbp)
jmp    161f <fmtfp+0x4cf>
jmp    165c <fmtfp+0x50c>
jmp    1661 <fmtfp+0x511>
cmpl   $0x0,-0x2bc(%rbp)
jle    1699 <fmtfp+0x549>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x20,%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
mov    -0x2bc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2bc(%rbp)
jmp    1661 <fmtfp+0x511>
cmpb   $0x0,-0x2d(%rbp)
je     16b9 <fmtfp+0x569>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsbl -0x2d(%rbp),%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
jmp    16be <fmtfp+0x56e>
cmpl   $0x0,-0x2b4(%rbp)
jle    16fb <fmtfp+0x5ab>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x2b4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2b4(%rbp)
cltq
movsbl -0x170(%rbp,%rax,1),%ecx
ff
mov    $0x0,%al
call   1070 <dopr_outch@plt>
jmp    16be <fmtfp+0x56e>
cmpl   $0x0,-0x28(%rbp)
jle    179b <fmtfp+0x64b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x2e,%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
cmpl   $0x0,-0x2c0(%rbp)
jle    1754 <fmtfp+0x604>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x30,%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
mov    -0x2c0(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c0(%rbp)
jmp    171c <fmtfp+0x5cc>
jmp    1759 <fmtfp+0x609>
cmpl   $0x0,-0x2b8(%rbp)
jle    1796 <fmtfp+0x646>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x2b8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2b8(%rbp)
cltq
movsbl -0x2b0(%rbp,%rax,1),%ecx
ff
mov    $0x0,%al
call   1070 <dopr_outch@plt>
jmp    1759 <fmtfp+0x609>
jmp    179b <fmtfp+0x64b>
jmp    17a0 <fmtfp+0x650>
cmpl   $0x0,-0x2bc(%rbp)
jge    17d8 <fmtfp+0x688>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x20,%ecx
mov    $0x0,%al
call   1070 <dopr_outch@plt>
mov    -0x2bc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2bc(%rbp)
jmp    17a0 <fmtfp+0x650>
add    $0x2f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmtfp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2c8,%rsp
mov    %r9d,%ebp
mov    %ecx,0x3c(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %edx,%r15d
mov    %rsi,%r13
mov    %rdi,%r14
test   %r8d,%r8d
mov    $0x6,%ebx
cmovns %r8d,%ebx
mov    $0x1,%al
call   1040 <abs_val@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
xorpd  %xmm1,%xmm1
ucomisd 0x8(%rsp),%xmm1
mov    %ebp,0x40(%rsp)
jbe    11a8 <fmtfp+0x58>
mov    $0x2d,%eax
jmp    11c9 <fmtfp+0x79>
xor    %edx,%edx
test   $0x2,%bpl
jne    11c4 <fmtfp+0x74>
mov    $0x1,%cl
mov    $0x0,%eax
test   $0x4,%bpl
je     11d0 <fmtfp+0x80>
mov    $0x20,%eax
jmp    11c9 <fmtfp+0x79>
mov    $0x2b,%eax
xor    %ecx,%ecx
mov    $0xffffffff,%edx
mov    %edx,0x38(%rsp)
mov    %ecx,0x24(%rsp)
mov    %eax,0x20(%rsp)
cmp    $0x10,%ebx
mov    $0x10,%ebp
mov    %ebx,0x44(%rsp)
cmovb  %ebx,%ebp
lea    0x10(%rsp),%rdi
mov    $0x1,%al
movsd  %xmm0,0x8(%rsp)
call   1060 <my_modf@plt>
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <POW10@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1050 <ROUND@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %rbp,0x28(%rsp)
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <POW10@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
jb     1293 <fmtfp+0x143>
movsd  0x10(%rsp),%xmm0
addsd  0xd96(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x28(%rsp),%rdi
xor    %eax,%eax
call   1030 <POW10@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
xor    %ebp,%ebp
lea    0x10(%rsp),%r12
lea    0xd81(%rip),%rbx
nopw   0x0(%rax,%rax,1)
mulsd  0xd50(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r12,%rdi
mov    $0x1,%al
call   1060 <my_modf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0xd30(%rip),%xmm1
mulsd  0xd30(%rip),%xmm1
cvttsd2si %xmm1,%eax
cltq
movzbl (%rax,%rbx,1),%ecx
lea    0x1(%rbp),%rax
mov    %cl,0x190(%rsp,%rbp,1)
ucomisd 0xd1b(%rip),%xmm0
jne    1309 <fmtfp+0x1b9>
jnp    1315 <fmtfp+0x1c5>
cmp    $0x136,%rbp
mov    %rax,%rbp
jb     12b0 <fmtfp+0x160>
lea    -0x1(%rax),%edx
cmp    $0x137,%eax
cmovne %eax,%edx
movb   $0x0,0x190(%rsp,%rdx,1)
movsd  0x18(%rsp),%xmm0
xor    %edi,%edi
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    $0x0,%esi
mov    %rdx,0x48(%rsp)
jne    134a <fmtfp+0x1fa>
jnp    13d6 <fmtfp+0x286>
xor    %r12d,%r12d
lea    0x18(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  0xca0(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rbp,%rdi
mov    $0x1,%al
call   1060 <my_modf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0xc80(%rip),%xmm1
mulsd  0xc80(%rip),%xmm1
cvttsd2si %xmm1,%eax
cltq
movzbl (%rax,%rbx,1),%ecx
lea    0x1(%r12),%rax
mov    %cl,0x50(%rsp,%r12,1)
ucomisd 0xc6c(%rip),%xmm0
jne    13b8 <fmtfp+0x268>
jnp    13c4 <fmtfp+0x274>
cmp    $0x136,%r12
mov    %rax,%r12
jb     1360 <fmtfp+0x210>
lea    -0x1(%rax),%esi
cmp    $0x137,%eax
cmovne %eax,%esi
mov    0x48(%rsp),%rdx
xor    %edi,%edi
mov    %esi,%ebp
movb   $0x0,0x50(%rsp,%rbp,1)
mov    0x28(%rsp),%rax
add    %edx,%eax
not    %eax
mov    0x38(%rsp),%ecx
add    0x3c(%rsp),%ecx
add    %eax,%ecx
cmovns %ecx,%edi
mov    %edi,%ebx
neg    %ebx
mov    0x40(%rsp),%eax
test   $0x1,%al
cmove  %edi,%ebx
test   $0x10,%al
mov    %esi,0x34(%rsp)
mov    %rbp,0x8(%rsp)
je     145f <fmtfp+0x30f>
test   %ebx,%ebx
jle    145f <fmtfp+0x30f>
cmpb   $0x0,0x24(%rsp)
jne    1434 <fmtfp+0x2e4>
xor    %r12d,%r12d
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    0x20(%rsp),%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
add    $0xffffffff,%ebx
je     14a8 <fmtfp+0x358>
add    $0x1,%ebx
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x30,%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1440 <fmtfp+0x2f0>
jmp    14a8 <fmtfp+0x358>
test   %ebx,%ebx
jle    15cc <fmtfp+0x47c>
add    $0x1,%ebx
xor    %r12d,%r12d
nopl   (%rax)
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    $0x20,%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1470 <fmtfp+0x320>
cmpb   $0x0,0x24(%rsp)
jne    14a8 <fmtfp+0x358>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
mov    0x20(%rsp),%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
mov    0x48(%rsp),%rax
test   %eax,%eax
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15d,%ebp
je     14f5 <fmtfp+0x3a5>
lea    0x1(%rax),%ebx
add    $0xffffffff,%eax
lea    (%rsp,%rax,1),%r15
add    $0x190,%r15
nopl   0x0(%rax,%rax,1)
movsbl (%r15),%ecx
mov    %rdi,%r14
mov    %rsi,%r13
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
mov    %r13,%rsi
mov    %r14,%rdi
add    $0xffffffff,%ebx
add    $0xffffffffffffffff,%r15
cmp    $0x1,%ebx
jg     14d0 <fmtfp+0x380>
cmpl   $0x0,0x44(%rsp)
mov    %ebp,%r13d
mov    %rsi,%r14
mov    %rdi,%r15
mov    0x8(%rsp),%rbp
jle    1592 <fmtfp+0x442>
mov    0x28(%rsp),%rax
mov    %eax,%ebx
sub    0x34(%rsp),%ebx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
mov    $0x2e,%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
test   %ebx,%ebx
mov    0x28(%rsp),%rbx
jle    155d <fmtfp+0x40d>
sub    %ebp,%ebx
add    $0x1,%ebx
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
mov    $0x30,%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
jg     1540 <fmtfp+0x3f0>
test   %ebp,%ebp
jle    1592 <fmtfp+0x442>
add    $0x1,%rbp
cs nopw 0x0(%rax,%rax,1)
nop
lea    -0x2(%rbp),%eax
movsbl 0x50(%rsp,%rax,1),%ecx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%rbp
jg     1570 <fmtfp+0x420>
test   %r12d,%r12d
jns    15ba <fmtfp+0x46a>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %r14,%rsi
mov    %r13d,%edx
mov    $0x20,%ecx
xor    %eax,%eax
call   1070 <dopr_outch@plt>
inc    %r12d
jne    15a0 <fmtfp+0x450>
add    $0x2c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %ebx,%r12d
cmpb   $0x0,0x24(%rsp)
je     1494 <fmtfp+0x344>
jmp    14a8 <fmtfp+0x358>

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

LLVM IR (-O2):
@.str.1 = [17 x i8] c"0123456789abcdef\00"
define void @fmtfp(i8* %0, i32* %1, i32 %2, double %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca [311 x i8]
%9 = alloca [311 x i8]
%10 = alloca double
%11 = alloca double
%12 = getelementptr inbounds [311 x i8], [311 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [311 x i8], [311 x i8]* %9, i64 0, i64 0
%14 = bitcast double* %10 to i8*
%15 = bitcast double* %11 to i8*
%16 = icmp slt i32 %5, 0
%17 = select i1 %16, i32 6, i32 %5
%18 = tail call i32 (double, ...) bitcast (i32 (...)* @abs_val to i32 (double, ...)*)(double %3)
%19 = sitofp i32 %18 to double
%20 = fcmp olt double %3, 0.000000e+00
br i1 %20, label %28, label %21
21: ; preds = %7
%22 = and i32 %6, 2
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = and i32 %6, 4
%26 = icmp eq i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %24
br label %28
28: ; preds = %21, %7, %27, %24
%29 = phi i32 [ -1, %27 ], [ 0, %24 ], [ -1, %7 ], [ -1, %21 ]
%30 = phi i1 [ false, %27 ], [ true, %24 ], [ false, %7 ], [ false, %21 ]
%31 = phi i32 [ 32, %27 ], [ 0, %24 ], [ 45, %7 ], [ 43, %21 ]
%32 = icmp ult i32 %17, 16
%33 = select i1 %32, i32 %17, i32 16
%34 = call i32 (double, double*, ...) bitcast (i32 (...)* @my_modf to i32 (double, double*, ...)*)(double %19, double* %10)
%35 = call i32 (i32, ...) bitcast (i32 (...)* @POW10 to i32 (i32, ...)*)(i32 %33)
%36 = sitofp i32 %35 to double
%37 = load double, double* %10
%38 = fsub double %19, %37
%39 = fmul double %38, %36
%40 = call i32 (double, ...) bitcast (i32 (...)* @ROUND to i32 (double, ...)*)(double %39)
%41 = sitofp i32 %40 to double
store double %41, double* %11
%42 = call i32 (i32, ...) bitcast (i32 (...)* @POW10 to i32 (i32, ...)*)(i32 %33)
%43 = sitofp i32 %42 to double
%44 = fcmp ult double %41, %43
br i1 %44, label %52, label %45
45: ; preds = %28
%46 = load double, double* %10
%47 = fadd double %46, 1.000000e+00
store double %47, double* %10
%48 = call i32 (i32, ...) bitcast (i32 (...)* @POW10 to i32 (i32, ...)*)(i32 %33)
%49 = sitofp i32 %48 to double
%50 = load double, double* %11
%51 = fsub double %50, %49
store double %51, double* %11
br label %52
52: ; preds = %45, %28
%53 = load double, double* %10
br label %54
54: ; preds = %54, %52
%55 = phi double [ %59, %54 ], [ %53, %52 ]
%56 = phi i64 [ %67, %54 ], [ 0, %52 ]
%57 = fmul double %55, 1.000000e-01
%58 = call i32 (double, double*, ...) bitcast (i32 (...)* @my_modf to i32 (double, double*, ...)*)(double %57, double* %10)
%59 = load double, double* %10
%60 = fsub double %57, %59
%61 = fadd double %60, 5.000000e-02
%62 = fmul double %61, 1.000000e+01
%63 = fptosi double %62 to i32
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.1, i64 0, i64 %64
%66 = load i8, i8* %65
%67 = add nuw nsw i64 %56, 1
%68 = getelementptr inbounds [311 x i8], [311 x i8]* %8, i64 0, i64 %56
store i8 %66, i8* %68
%69 = fcmp une double %59, 0.000000e+00
%70 = icmp ult i64 %56, 310
%71 = select i1 %69, i1 %70, i1 false
br i1 %71, label %54, label %72
72: ; preds = %54
%73 = trunc i64 %56 to i32
%74 = trunc i64 %67 to i32
%75 = icmp eq i32 %74, 311
%76 = select i1 %75, i32 %73, i32 %74
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds [311 x i8], [311 x i8]* %8, i64 0, i64 %77
store i8 0, i8* %78
%79 = load double, double* %11
%80 = fcmp une double %79, 0.000000e+00
br i1 %80, label %81, label %104
81: ; preds = %72, %81
%82 = phi double [ %86, %81 ], [ %79, %72 ]
%83 = phi i64 [ %94, %81 ], [ 0, %72 ]
%84 = fmul double %82, 1.000000e-01
%85 = call i32 (double, double*, ...) bitcast (i32 (...)* @my_modf to i32 (double, double*, ...)*)(double %84, double* %11)
%86 = load double, double* %11
%87 = fsub double %84, %86
%88 = fadd double %87, 5.000000e-02
%89 = fmul double %88, 1.000000e+01
%90 = fptosi double %89 to i32
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [17 x i8], [17 x i8]* @.str.1, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = add nuw nsw i64 %83, 1
%95 = getelementptr inbounds [311 x i8], [311 x i8]* %9, i64 0, i64 %83
store i8 %93, i8* %95
%96 = fcmp une double %86, 0.000000e+00
%97 = icmp ult i64 %83, 310
%98 = select i1 %96, i1 %97, i1 false
br i1 %98, label %81, label %99
99: ; preds = %81
%100 = trunc i64 %83 to i32
%101 = trunc i64 %94 to i32
%102 = icmp eq i32 %101, 311
%103 = select i1 %102, i32 %100, i32 %101
br label %104
104: ; preds = %99, %72
%105 = phi i32 [ 0, %72 ], [ %103, %99 ]
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds [311 x i8], [311 x i8]* %9, i64 0, i64 %106
store i8 0, i8* %107
%108 = add nuw i32 %76, %33
%109 = xor i32 %108, -1
%110 = add i32 %29, %4
%111 = add i32 %110, %109
%112 = sub nsw i32 %33, %105
%113 = icmp sgt i32 %112, 0
%114 = icmp sgt i32 %111, 0
%115 = select i1 %114, i32 %111, i32 0
%116 = and i32 %6, 1
%117 = icmp eq i32 %116, 0
%118 = sub nsw i32 0, %115
%119 = select i1 %117, i32 %115, i32 %118
%120 = and i32 %6, 16
%121 = icmp ne i32 %120, 0
%122 = icmp sgt i32 %119, 0
%123 = select i1 %121, i1 %122, i1 false
br i1 %123, label %124, label %136
124: ; preds = %104
br i1 %30, label %129, label %125
125: ; preds = %124
%126 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 %31)
%127 = add nsw i32 %119, -1
%128 = icmp eq i32 %127, 0
br i1 %128, label %147, label %129
129: ; preds = %124, %125
%130 = phi i32 [ %119, %124 ], [ %127, %125 ]
br label %131
131: ; preds = %129, %131
%132 = phi i32 [ %134, %131 ], [ %130, %129 ]
%133 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 48)
%134 = add nsw i32 %132, -1
%135 = icmp ugt i32 %132, 1
br i1 %135, label %131, label %147
136: ; preds = %104
%137 = icmp sgt i32 %119, 0
br i1 %137, label %138, label %143
138: ; preds = %136, %138
%139 = phi i32 [ %141, %138 ], [ %119, %136 ]
%140 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 32)
%141 = add nsw i32 %139, -1
%142 = icmp ugt i32 %139, 1
br i1 %142, label %138, label %143
143: ; preds = %138, %136
%144 = phi i32 [ %119, %136 ], [ 0, %138 ]
br i1 %30, label %147, label %145
145: ; preds = %143
%146 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 %31)
br label %147
147: ; preds = %131, %125, %145, %143
%148 = phi i32 [ %144, %145 ], [ %144, %143 ], [ 0, %125 ], [ 0, %131 ]
%149 = icmp eq i32 %76, 0
br i1 %149, label %160, label %150
150: ; preds = %147, %150
%151 = phi i64 [ %152, %150 ], [ %77, %147 ]
%152 = add nsw i64 %151, -1
%153 = and i64 %152, 4294967295
%154 = getelementptr inbounds [311 x i8], [311 x i8]* %8, i64 0, i64 %153
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 %156)
%158 = trunc i64 %151 to i32
%159 = icmp sgt i32 %158, 1
br i1 %159, label %150, label %160
160: ; preds = %150, %147
%161 = icmp sgt i32 %17, 0
br i1 %161, label %162, label %180
162: ; preds = %160
%163 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 46)
br i1 %113, label %166, label %164
164: ; preds = %166, %162
%165 = icmp sgt i32 %105, 0
br i1 %165, label %171, label %180
166: ; preds = %162, %166
%167 = phi i32 [ %169, %166 ], [ %112, %162 ]
%168 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 48)
%169 = add nsw i32 %167, -1
%170 = icmp sgt i32 %167, 1
br i1 %170, label %166, label %164
171: ; preds = %164, %171
%172 = phi i64 [ %173, %171 ], [ %106, %164 ]
%173 = add nsw i64 %172, -1
%174 = and i64 %173, 4294967295
%175 = getelementptr inbounds [311 x i8], [311 x i8]* %9, i64 0, i64 %174
%176 = load i8, i8* %175
%177 = sext i8 %176 to i32
%178 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 %177)
%179 = icmp sgt i64 %172, 1
br i1 %179, label %171, label %180
180: ; preds = %171, %164, %160
%181 = icmp slt i32 %148, 0
br i1 %181, label %182, label %187
182: ; preds = %180, %182
%183 = phi i32 [ %185, %182 ], [ %148, %180 ]
%184 = call i32 (i8*, i32*, i32, i32, ...) bitcast (i32 (...)* @dopr_outch to i32 (i8*, i32*, i32, i32, ...)*)(i8* %0, i32* %1, i32 %2, i32 32)
%185 = add i32 %183, 1
%186 = icmp eq i32 %185, 0
br i1 %186, label %187, label %182
187: ; preds = %182, %180
ret void
}