#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 */
typedef int /*<<< orphan*/ iconvert;

/* Variables and functions */
double abs_val(double);
int /*<<< orphan*/ doapr_outch(char **, char **, size_t *, size_t *, char);
double pow_10(int);
long roundv(double);
void fmtfp(char **sbuffer, char **buffer, size_t *currlen, size_t *maxlen,
           double fvalue, int min, int max, int flags) {
  int signvalue = 0;
  double ufvalue;
  char iconvert[20];
  char fconvert[20];
  int iplace = 0;
  int fplace = 0;
  int padlen = 0;
  int zpadlen = 0;
  long intpart;
  long fracpart;
  long max10;
  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 = ' ';
  intpart = (long)ufvalue;
  if (max > 9)
    max = 9;
  max10 = roundv(pow_10(max));
  fracpart = roundv(pow_10(max) * (ufvalue - intpart));
  if (fracpart >= max10) {
    intpart++;
    fracpart -= max10;
  }
  do {
    iconvert[iplace++] = "0123456789"[intpart % 10];
    intpart = (intpart / 10);
  } while (intpart && (iplace < (int)sizeof(iconvert)));
  if (iplace == sizeof iconvert)
    iplace--;
  iconvert[iplace] = 0;
  do {
    fconvert[fplace++] = "0123456789"[fracpart % 10];
    fracpart = (fracpart / 10);
  } while (fplace < max);
  if (fplace == sizeof fconvert)
    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) {
      doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
      --padlen;
      signvalue = 0;
    }
    while (padlen > 0) {
      doapr_outch(sbuffer, buffer, currlen, maxlen, '0');
      --padlen;
    }
  }
  while (padlen > 0) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
    --padlen;
  }
  if (signvalue)
    doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue);
  while (iplace > 0)
    doapr_outch(sbuffer, buffer, currlen, maxlen, iconvert[--iplace]);
  if (max > 0 || (flags & (1 << 3))) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, '.');
    while (fplace > 0)
      doapr_outch(sbuffer, buffer, currlen, maxlen, fconvert[--fplace]);
  }
  while (zpadlen > 0) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, '0');
    --zpadlen;
  }
  while (padlen < 0) {
    doapr_outch(sbuffer, buffer, currlen, maxlen, ' ');
    ++padlen;
  }
}


x86 assembly (clang, -O0):
<fmtfp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x84(%rbp)
movl   $0x0,-0x88(%rbp)
movl   $0x0,-0x8c(%rbp)
movl   $0x0,-0x90(%rbp)
cmpl   $0x0,-0x30(%rbp)
jge    11ab <fmtfp+0x6b>
movl   $0x6,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <abs_val@plt>
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    11d4 <fmtfp+0x94>
movl   $0x2d,-0x34(%rbp)
jmp    120f <fmtfp+0xcf>
mov    0x10(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11ef <fmtfp+0xaf>
movl   $0x2b,-0x34(%rbp)
jmp    120a <fmtfp+0xca>
mov    0x10(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1205 <fmtfp+0xc5>
movl   $0x20,-0x34(%rbp)
jmp    120a <fmtfp+0xca>
jmp    120f <fmtfp+0xcf>
cvttsd2si -0x40(%rbp),%rax
mov    %rax,-0x98(%rbp)
cmpl   $0x9,-0x30(%rbp)
jle    122d <fmtfp+0xed>
movl   $0x9,-0x30(%rbp)
mov    -0x30(%rbp),%edi
call   1030 <pow_10@plt>
call   1060 <roundv@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x30(%rbp),%edi
call   1030 <pow_10@plt>
movsd  -0x40(%rbp),%xmm1
cvtsi2sdq -0x98(%rbp),%xmm2
ff ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1060 <roundv@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
cmp    -0xa8(%rbp),%rax
jl     12a9 <fmtfp+0x169>
mov    -0x98(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x98(%rbp)
mov    -0xa8(%rbp),%rcx
mov    -0xa0(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0xa0(%rbp)
jmp    12ae <fmtfp+0x16e>
mov    -0x98(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
lea    0xd3a(%rip),%rax
mov    (%rax,%rdx,1),%cl
mov    -0x84(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x84(%rbp)
cltq
mov    %cl,-0x60(%rbp,%rax,1)
mov    -0x98(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x98(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x98(%rbp)
mov    %al,-0xa9(%rbp)
je     131e <fmtfp+0x1de>
cmpl   $0x14,-0x84(%rbp)
setl   %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%al
test   $0x1,%al
jne    12ae <fmtfp+0x16e>
movslq -0x84(%rbp),%rax
cmp    $0x14,%rax
jne    134c <fmtfp+0x20c>
mov    -0x84(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x84(%rbp)
movslq -0x84(%rbp),%rax
movb   $0x0,-0x60(%rbp,%rax,1)
mov    -0xa0(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
lea    0xc90(%rip),%rax
mov    (%rax,%rdx,1),%cl
mov    -0x88(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x88(%rbp)
cltq
mov    %cl,-0x80(%rbp,%rax,1)
mov    -0xa0(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0xa0(%rbp)
mov    -0x88(%rbp),%eax
cmp    -0x30(%rbp),%eax
jl     1358 <fmtfp+0x218>
movslq -0x88(%rbp),%rax
cmp    $0x14,%rax
jne    13d1 <fmtfp+0x291>
mov    -0x88(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x88(%rbp)
movslq -0x88(%rbp),%rax
movb   $0x0,-0x80(%rbp,%rax,1)
mov    -0x2c(%rbp),%eax
sub    -0x84(%rbp),%eax
sub    -0x30(%rbp),%eax
sub    $0x1,%eax
mov    -0x34(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%edx
cmp    $0x0,%esi
cmovne %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x30(%rbp),%eax
sub    -0x88(%rbp),%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x0,-0x90(%rbp)
jge    142a <fmtfp+0x2ea>
movl   $0x0,-0x90(%rbp)
cmpl   $0x0,-0x8c(%rbp)
jge    1441 <fmtfp+0x301>
movl   $0x0,-0x8c(%rbp)
mov    0x10(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     145e <fmtfp+0x31e>
xor    %eax,%eax
sub    -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    0x10(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     14fc <fmtfp+0x3bc>
cmpl   $0x0,-0x8c(%rbp)
jle    14fc <fmtfp+0x3bc>
cmpl   $0x0,-0x34(%rbp)
je     14b6 <fmtfp+0x376>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%eax
movsbl %al,%r8d
call   1040 <doapr_outch@plt>
mov    -0x8c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8c(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    14bb <fmtfp+0x37b>
cmpl   $0x0,-0x8c(%rbp)
jle    14f7 <fmtfp+0x3b7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x30,%r8d
call   1040 <doapr_outch@plt>
mov    -0x8c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8c(%rbp)
jmp    14bb <fmtfp+0x37b>
jmp    14fc <fmtfp+0x3bc>
jmp    1501 <fmtfp+0x3c1>
cmpl   $0x0,-0x8c(%rbp)
jle    153d <fmtfp+0x3fd>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x20,%r8d
call   1040 <doapr_outch@plt>
mov    -0x8c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8c(%rbp)
jmp    1501 <fmtfp+0x3c1>
cmpl   $0x0,-0x34(%rbp)
je     1563 <fmtfp+0x423>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%eax
movsbl %al,%r8d
call   1040 <doapr_outch@plt>
jmp    1568 <fmtfp+0x428>
cmpl   $0x0,-0x84(%rbp)
jle    15a6 <fmtfp+0x466>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x84(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x84(%rbp)
cltq
movsbl -0x60(%rbp,%rax,1),%r8d
call   1040 <doapr_outch@plt>
jmp    1568 <fmtfp+0x428>
cmpl   $0x0,-0x30(%rbp)
jg     15bf <fmtfp+0x47f>
mov    0x10(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     161d <fmtfp+0x4dd>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2e,%r8d
call   1040 <doapr_outch@plt>
cmpl   $0x0,-0x88(%rbp)
jle    1618 <fmtfp+0x4d8>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x88(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x88(%rbp)
cltq
movsbl -0x80(%rbp,%rax,1),%r8d
call   1040 <doapr_outch@plt>
jmp    15da <fmtfp+0x49a>
jmp    161d <fmtfp+0x4dd>
jmp    1622 <fmtfp+0x4e2>
cmpl   $0x0,-0x90(%rbp)
jle    165e <fmtfp+0x51e>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x30,%r8d
call   1040 <doapr_outch@plt>
mov    -0x90(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x90(%rbp)
jmp    1622 <fmtfp+0x4e2>
jmp    1663 <fmtfp+0x523>
cmpl   $0x0,-0x8c(%rbp)
jge    169f <fmtfp+0x55f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x20,%r8d
call   1040 <doapr_outch@plt>
mov    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    1663 <fmtfp+0x523>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmtfp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r8d,%ebp
movsd  %xmm0,0x18(%rsp)
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %rsi,0x38(%rsp)
mov    %rdi,0x30(%rsp)
mov    0xb0(%rsp),%r14d
test   %r9d,%r9d
mov    $0x6,%r12d
cmovns %r9d,%r12d
call   1050 <abs_val@plt>
xorpd  %xmm1,%xmm1
ucomisd 0x18(%rsp),%xmm1
mov    %r14d,0x28(%rsp)
mov    %rbx,0x58(%rsp)
mov    %ebp,0xc(%rsp)
jbe    11a5 <fmtfp+0x65>
movl   $0x2d,0x4(%rsp)
jmp    11c9 <fmtfp+0x89>
test   $0x2,%r14b
jne    11c1 <fmtfp+0x81>
mov    %r14d,%ebp
and    $0x4,%ebp
sete   %al
mov    %eax,0x8(%rsp)
shl    $0x3,%ebp
mov    %ebp,0x4(%rsp)
jmp    11d1 <fmtfp+0x91>
movl   $0x2b,0x4(%rsp)
movl   $0x0,0x8(%rsp)
cvttsd2si %xmm0,%r14
cmp    $0x9,%r12d
mov    $0x9,%ebx
cmovb  %r12d,%ebx
mov    %ebx,%edi
movsd  %xmm0,0x10(%rsp)
call   1030 <pow_10@plt>
call   1060 <roundv@plt>
mov    %rax,%rbp
mov    %rbx,0x18(%rsp)
mov    %ebx,%edi
call   1030 <pow_10@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %r14,%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
call   1060 <roundv@plt>
mov    %rax,%rcx
xor    %edi,%edi
xor    %edx,%edx
cmp    %rbp,%rax
cmovl  %rdi,%rbp
setge  %dl
add    %r14,%rdx
lea    0xdc6(%rip),%r8
movabs $0x6666666666666667,%r9
66 66 66
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdx,%rbx
mov    %rdx,%rax
imul   %r9
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
lea    (%rdx,%rdx,1),%rax
lea    (%rax,%rax,4),%rax
mov    %rbx,%rsi
sub    %rax,%rsi
movzbl (%r8,%rsi,1),%esi
lea    0x1(%rdi),%rax
mov    %sil,0x60(%rsp,%rdi,1)
add    $0xfffffffffffffff6,%rbx
cmp    $0xffffffffffffffec,%rbx
ja     1296 <fmtfp+0x156>
cmp    $0x13,%rdi
mov    %rax,%rdi
jb     1250 <fmtfp+0x110>
sub    %rbp,%rcx
lea    -0x1(%rax),%r13d
cmp    $0x14,%eax
cmovne %eax,%r13d
movb   $0x0,0x60(%rsp,%r13,1)
mov    $0x1,%r10d
mov    0x18(%rsp),%rax
cmp    $0x2,%eax
cmovge %eax,%r10d
mov    %r15,0x20(%rsp)
mov    %r10,0x10(%rsp)
jge    12d7 <fmtfp+0x197>
xor    %ebx,%ebx
mov    0xb0(%rsp),%r14d
jmp    1386 <fmtfp+0x246>
and    $0xe,%r10d
xor    %ebx,%ebx
movabs $0xa3d70a3d70a3d70b,%r11
0a d7 a3
mov    %rcx,%rsi
mov    0xb0(%rsp),%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,%rax
imul   %r9
mov    %rdx,%rdi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdi
add    %rax,%rdi
lea    (%rdi,%rdi,1),%rcx
mov    %rdi,%rax
imul   %r9
mov    %rdx,%rbp
lea    (%rcx,%rcx,4),%r15
mov    %rsi,%rax
imul   %r11
mov    %rdx,%rcx
add    %rsi,%rcx
sub    %r15,%rsi
movzbl (%r8,%rsi,1),%eax
mov    %al,0x40(%rsp,%rbx,1)
mov    %rbp,%rax
shr    $0x3f,%rax
sar    $0x2,%rbp
add    %rax,%rbp
add    %rbp,%rbp
lea    0x0(,%rbp,4),%rax
add    %rbp,%rax
sub    %rax,%rdi
movzbl (%rdi,%r8,1),%eax
mov    %al,0x41(%rsp,%rbx,1)
add    $0x2,%rbx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x6,%rcx
add    %rax,%rcx
mov    %rcx,%rsi
cmp    %rbx,%r10
jne    1300 <fmtfp+0x1c0>
mov    %r12d,0x2c(%rsp)
mov    0x10(%rsp),%rsi
test   $0x1,%sil
je     13bc <fmtfp+0x27c>
mov    %rcx,%rax
imul   %r9
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
add    %rdx,%rdx
lea    (%rdx,%rdx,4),%rax
sub    %rax,%rcx
mov    (%r8,%rcx,1),%al
mov    %al,0x40(%rsp,%rbx,1)
movb   $0x0,0x40(%rsp,%rsi,1)
mov    0x18(%rsp),%rax
add    %r13d,%eax
not    %eax
mov    0x8(%rsp),%esi
mov    %esi,%ecx
xor    $0x1,%cl
movzbl %cl,%ecx
mov    0xc(%rsp),%edx
sub    %ecx,%edx
xor    %ecx,%ecx
add    %eax,%edx
cmovs  %ecx,%edx
mov    %edx,%r12d
neg    %r12d
test   $0x1,%r14b
cmove  %edx,%r12d
test   $0x10,%r14b
mov    0x58(%rsp),%rbp
mov    0x20(%rsp),%r14
mov    0x38(%rsp),%r15
mov    0x30(%rsp),%rbx
je     1466 <fmtfp+0x326>
test   %r12d,%r12d
jle    1466 <fmtfp+0x326>
test   %sil,%sil
jne    1432 <fmtfp+0x2f2>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    0x4(%rsp),%r8d
call   1040 <doapr_outch@plt>
add    $0xffffffff,%r12d
je     1461 <fmtfp+0x321>
add    $0x1,%r12d
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    $0x30,%r8d
call   1040 <doapr_outch@plt>
add    $0xffffffff,%r12d
cmp    $0x1,%r12d
ja     1440 <fmtfp+0x300>
xor    %r12d,%r12d
jmp    14af <fmtfp+0x36f>
test   %r12d,%r12d
jle    1494 <fmtfp+0x354>
add    $0x1,%r12d
nop
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
mov    $0x20,%r8d
call   1040 <doapr_outch@plt>
add    $0xffffffff,%r12d
cmp    $0x1,%r12d
ja     1470 <fmtfp+0x330>
xor    %r12d,%r12d
mov    0x4(%rsp),%r8d
test   %r8d,%r8d
je     14af <fmtfp+0x36f>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %rbp,%rcx
call   1040 <doapr_outch@plt>
mov    %r13,%rax
test   %eax,%eax
mov    0x20(%rsp),%rdx
mov    0x38(%rsp),%rsi
mov    0x30(%rsp),%rcx
mov    %rcx,%r14
mov    %rsi,%r13
je     1509 <fmtfp+0x3c9>
lea    0x1(%rax),%ebx
add    $0xffffffff,%eax
lea    (%rsp,%rax,1),%r15
add    $0x60,%r15
nopl   0x0(%rax)
movsbl (%r15),%r8d
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbp,%rcx
call   1040 <doapr_outch@plt>
mov    0x20(%rsp),%rdx
mov    %r13,%rsi
mov    %r14,%rcx
add    $0xffffffff,%ebx
add    $0xffffffffffffffff,%r15
cmp    $0x1,%ebx
jg     14e0 <fmtfp+0x3a0>
mov    0x18(%rsp),%rax
sub    0x10(%rsp),%eax
mov    %eax,0xc(%rsp)
cmpl   $0x0,0x2c(%rsp)
mov    %rbp,%r15
jg     1527 <fmtfp+0x3e7>
andl   $0x8,0x28(%rsp)
je     158a <fmtfp+0x44a>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rcx
mov    $0x2e,%r8d
call   1040 <doapr_outch@plt>
mov    0x20(%rsp),%rdx
mov    0x10(%rsp),%rax
lea    0x1(%rax),%ebx
add    $0xffffffff,%eax
lea    (%rsp,%rax,1),%rbp
add    $0x40,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl 0x0(%rbp),%r8d
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rcx
call   1040 <doapr_outch@plt>
mov    0x20(%rsp),%rdx
mov    %r13,%rsi
mov    %r14,%rcx
add    $0xffffffff,%ebx
add    $0xffffffffffffffff,%rbp
cmp    $0x1,%ebx
jg     1560 <fmtfp+0x420>
cmpl   $0x0,0xc(%rsp)
mov    %rdx,%r13
mov    %rsi,%r14
mov    %rcx,%rbp
mov    0x18(%rsp),%rbx
jle    15cf <fmtfp+0x48f>
sub    0x10(%rsp),%ebx
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    $0x30,%r8d
call   1040 <doapr_outch@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
jg     15b0 <fmtfp+0x470>
test   %r12d,%r12d
jns    15fc <fmtfp+0x4bc>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    $0x20,%r8d
call   1040 <doapr_outch@plt>
inc    %r12d
jne    15e0 <fmtfp+0x4a0>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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