#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*/ assert(int);
int /*<<< orphan*/ isfinite(double);
scalar_t__ isnan(double);
int /*<<< orphan*/ memcpy(char *, char const *, int const);
int /*<<< orphan*/ memmove(char *, char *, int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ sprintf(char *, char *, int, double);
char *strchr(char *, char);
int strlen(char *);
void si_sprintf(char *buff, double ival, int n_places, const int flags) {
  int i;
  char prefix = '#';
  const char *err_msg = NULL;
  const bool use_si_prefixes = !(flags & 1);
  const bool use_extended_prefixes = (flags & 2);
  const double extender = (use_extended_prefixes ? 1e+51 : 1);
  assert(n_places > 1);
  assert(n_places < 25);
  if (ival < 0.) {
    *buff++ = '-';
    n_places--;
    ival = -ival;
  } else if (flags & 4) {
    *buff++ = '+';
    n_places--;
  }
  buff[n_places] = '\0';
  if (!ival)
    sprintf(buff, "%*d", n_places, 0);
  else if (isnan(ival))
    err_msg = "NaN!";
  else if (!isfinite(ival))
    err_msg = "inf!";
  else if (ival > 999.39e+24 * extender ||
           (ival > 99.39e+24 * extender && n_places == 3) ||
           (ival > 9.939e+24 * extender && n_places == 2) ||
           (ival < 1.01e-24 / extender && use_si_prefixes)) {
    char tbuff[100], *tptr;
    int len;
    sprintf(tbuff, "%.*e", n_places, ival);
    tptr = strchr(tbuff, 'e');
    if (tptr) {
      while (tptr[2] == '0')
        memmove(tptr + 2, tptr + 3, strlen(tptr + 2));
      len = strlen(tptr);
      if (len <= n_places) {
        memcpy(buff, tbuff, n_places - len);
        memcpy(buff + n_places - len, tptr, len);
        ival = 0.;
      }
    }
    if (ival)
      err_msg = (ival < 1. ? "Low!" : "Huge");
  } else if (ival < .011 && use_si_prefixes) {
    const char *lower_prefixes = " munpfazyxwvtsrqoljihgedcb";
    const double limit = (n_places > 3 ? .9994 : .0994);
    for (i = 0; lower_prefixes[i] && ival < limit; i++)
      ival *= 1000.;
    prefix = lower_prefixes[i];
  } else {
    double top_val = 1.;
    for (i = 0; ival > top_val - .6; i++)
      top_val *= 10.;
    if (i > n_places) {
      const char *prefixes = " kMGTPEZYXWVUSRQONLJIHFDCBA";
      const double limit = (n_places > 3 ? 999.4 : 99.4);
      for (i = 0; ival > limit && prefixes[i]; i++)
        ival /= 1000.;
      prefix = prefixes[i];
    }
  }
  if (!prefix || err_msg) {
    memset(buff, '!', n_places);
    if (err_msg) {
      const int len = (n_places > 4 ? 4 : n_places);
      memcpy(buff + (n_places - len) / 2, err_msg, len);
    }
  } else if (ival) {
    char tbuff[100];
    if (prefix != '#') {
      n_places--;
      buff[n_places] = prefix;
    }
    sprintf(tbuff, "%.*f", n_places, ival);
    if (*tbuff == '0')
      memcpy(buff, tbuff + 1, n_places);
    else
      memcpy(buff, tbuff, n_places);
    if (n_places == 1 && ival > 9.4)
      *buff = '!';
  }
}


x86 assembly (clang, -O0):
<si_sprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movb   $0x23,-0x1d(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%eax
and    $0x2,%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
movsd  0xe20(%rip),%xmm0
movsd  0xe20(%rip),%xmm1
movsd  %xmm1,-0x150(%rbp)
ff
cmp    $0x0,%eax
movsd  %xmm0,-0x148(%rbp)
ff
jne    1211 <si_sprintf+0x81>
movsd  -0x150(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x148(%rbp),%xmm0
ff
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x1,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpl   $0x19,-0x14(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    128f <si_sprintf+0xff>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2d,(%rax)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    12be <si_sprintf+0x12e>
mov    -0x18(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     12b9 <si_sprintf+0x129>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x2b,(%rax)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    12be <si_sprintf+0x12e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12fd <si_sprintf+0x16d>
jp     12fd <si_sprintf+0x16d>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd88(%rip),%rsi
xorps  %xmm0,%xmm0
call   10b0 <sprintf@plt>
jmp    179b <si_sprintf+0x60b>
movsd  -0x10(%rbp),%xmm0
call   1090 <isnan@plt>
cmp    $0x0,%rax
je     1321 <si_sprintf+0x191>
lea    0xd64(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1796 <si_sprintf+0x606>
movsd  -0x10(%rbp),%xmm0
call   1080 <isfinite@plt>
cmp    $0x0,%eax
jne    1344 <si_sprintf+0x1b4>
lea    0xd46(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1791 <si_sprintf+0x601>
movsd  -0x10(%rbp),%xmm0
movsd  0xcbf(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
ucomisd %xmm1,%xmm0
ja     13d2 <si_sprintf+0x242>
movsd  -0x10(%rbp),%xmm0
movsd  0xcab(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    1386 <si_sprintf+0x1f6>
cmpl   $0x3,-0x14(%rbp)
je     13d2 <si_sprintf+0x242>
movsd  -0x10(%rbp),%xmm0
movsd  0xc8d(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jbe    13ac <si_sprintf+0x21c>
cmpl   $0x2,-0x14(%rbp)
je     13d2 <si_sprintf+0x242>
movsd  -0x10(%rbp),%xmm1
movsd  0xc6f(%rip),%xmm0
divsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1536 <si_sprintf+0x3a6>
cmpl   $0x0,-0x2c(%rbp)
je     1536 <si_sprintf+0x3a6>
lea    -0xa0(%rbp),%rdi
mov    -0x14(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xc9e(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0xa0(%rbp),%rdi
mov    $0x65,%esi
call   1040 <strchr@plt>
mov    %rax,-0xa8(%rbp)
cmpq   $0x0,-0xa8(%rbp)
je     14ed <si_sprintf+0x35d>
jmp    1418 <si_sprintf+0x288>
mov    -0xa8(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x30,%eax
jne    147a <si_sprintf+0x2ea>
mov    -0xa8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x160(%rbp)
mov    -0xa8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x158(%rbp)
mov    -0xa8(%rbp),%rdi
add    $0x2,%rdi
call   1030 <strlen@plt>
mov    -0x160(%rbp),%rdi
mov    -0x158(%rbp),%rsi
mov    %eax,%edx
call   10a0 <memmove@plt>
jmp    1418 <si_sprintf+0x288>
mov    -0xa8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xac(%rbp)
mov    -0xac(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     14e8 <si_sprintf+0x358>
mov    -0x8(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
mov    -0x14(%rbp),%edx
sub    -0xac(%rbp),%edx
call   1070 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
movslq -0xac(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    -0xa8(%rbp),%rsi
mov    -0xac(%rbp),%edx
call   1070 <memcpy@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    14ed <si_sprintf+0x35d>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    150a <si_sprintf+0x37a>
jp     150a <si_sprintf+0x37a>
jmp    1531 <si_sprintf+0x3a1>
movsd  -0x10(%rbp),%xmm1
movsd  0xaf1(%rip),%xmm0
lea    0xb72(%rip),%rax
lea    0xb66(%rip),%rcx
ucomisd %xmm1,%xmm0
cmova  %rcx,%rax
mov    %rax,-0x28(%rbp)
jmp    178c <si_sprintf+0x5fc>
movsd  0xaf2(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1637 <si_sprintf+0x4a7>
cmpl   $0x0,-0x2c(%rbp)
je     1637 <si_sprintf+0x4a7>
lea    0xb3b(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x14(%rbp),%eax
movsd  0xaf4(%rip),%xmm0
movsd  0xaf4(%rip),%xmm1
movsd  %xmm1,-0x170(%rbp)
ff
cmp    $0x3,%eax
movsd  %xmm0,-0x168(%rbp)
ff
jg     159d <si_sprintf+0x40d>
movsd  -0x170(%rbp),%xmm0
ff
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x168(%rbp),%xmm0
ff
movsd  %xmm0,-0xc0(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
mov    -0xb8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x171(%rbp)
je     15ee <si_sprintf+0x45e>
movsd  -0x10(%rbp),%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x171(%rbp)
mov    -0x171(%rbp),%al
test   $0x1,%al
jne    1601 <si_sprintf+0x471>
jmp    1621 <si_sprintf+0x491>
movsd  0xa47(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    15b4 <si_sprintf+0x424>
mov    -0xb8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1d(%rbp)
jmp    1787 <si_sprintf+0x5f7>
movsd  0x9c9(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0xc8(%rbp),%xmm1
ff
movsd  0x9d5(%rip),%xmm2
subsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    1697 <si_sprintf+0x507>
movsd  0x9df(%rip),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    164e <si_sprintf+0x4be>
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1782 <si_sprintf+0x5f2>
lea    0xa06(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x14(%rbp),%eax
movsd  0x984(%rip),%xmm0
movsd  0x984(%rip),%xmm1
movsd  %xmm1,-0x188(%rbp)
ff
cmp    $0x3,%eax
movsd  %xmm0,-0x180(%rbp)
ff
jg     16ed <si_sprintf+0x55d>
movsd  -0x188(%rbp),%xmm0
ff
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x180(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0xd8(%rbp),%xmm0
ff
mov    %al,-0x189(%rbp)
jbe    173a <si_sprintf+0x5aa>
mov    -0xd0(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x189(%rbp)
mov    -0x189(%rbp),%al
test   $0x1,%al
jne    174d <si_sprintf+0x5bd>
jmp    1771 <si_sprintf+0x5e1>
movsd  -0x10(%rbp),%xmm0
movsd  0x8f6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1704 <si_sprintf+0x574>
mov    -0xd0(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1d(%rbp)
jmp    1787 <si_sprintf+0x5f7>
jmp    178c <si_sprintf+0x5fc>
jmp    1791 <si_sprintf+0x601>
jmp    1796 <si_sprintf+0x606>
jmp    179b <si_sprintf+0x60b>
cmpb   $0x0,-0x1d(%rbp)
je     17b0 <si_sprintf+0x620>
cmpq   $0x0,-0x28(%rbp)
je     1829 <si_sprintf+0x699>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x21,%esi
call   1050 <memset@plt>
cmpq   $0x0,-0x28(%rbp)
je     1824 <si_sprintf+0x694>
cmpl   $0x4,-0x14(%rbp)
jle    17e6 <si_sprintf+0x656>
mov    $0x4,%eax
mov    %eax,-0x190(%rbp)
jmp    17ef <si_sprintf+0x65f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x190(%rbp)
mov    -0x190(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
sub    -0xdc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cltq
add    %rax,%rdi
mov    -0x28(%rbp),%rsi
mov    -0xdc(%rbp),%edx
call   1070 <memcpy@plt>
jmp    18f6 <si_sprintf+0x766>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1846 <si_sprintf+0x6b6>
jp     1846 <si_sprintf+0x6b6>
jmp    18f1 <si_sprintf+0x761>
movsbl -0x1d(%rbp),%eax
cmp    $0x23,%eax
je     186a <si_sprintf+0x6da>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x1d(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
lea    -0x140(%rbp),%rdi
mov    -0x14(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0x84c(%rip),%rsi
call   10b0 <sprintf@plt>
movsbl -0x140(%rbp),%eax
cmp    $0x30,%eax
jne    18b1 <si_sprintf+0x721>
mov    -0x8(%rbp),%rdi
lea    -0x140(%rbp),%rsi
add    $0x1,%rsi
mov    -0x14(%rbp),%edx
call   1070 <memcpy@plt>
jmp    18c4 <si_sprintf+0x734>
mov    -0x8(%rbp),%rdi
lea    -0x140(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1070 <memcpy@plt>
cmpl   $0x1,-0x14(%rbp)
jne    18ec <si_sprintf+0x75c>
movsd  -0x10(%rbp),%xmm0
movsd  0x795(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    18ec <si_sprintf+0x75c>
mov    -0x8(%rbp),%rax
movb   $0x21,(%rax)
jmp    18f1 <si_sprintf+0x761>
jmp    18f6 <si_sprintf+0x766>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si_sprintf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %edx,%ebx
mov    %esi,%r13d
movapd %xmm0,(%rsp)
mov    %rdi,%r14
xor    %ebp,%ebp
test   $0x2,%bl
sete   %r12b
xor    %edi,%edi
cmp    $0x2,%esi
setge  %dil
call   1060 <assert@plt>
xor    %edi,%edi
cmp    $0x19,%r13d
setl   %dil
call   1060 <assert@plt>
movapd (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    11f6 <si_sprintf+0x66>
movb   $0x2d,(%r14)
add    $0x1,%r14
add    $0xffffffff,%r13d
xorpd  0xe1c(%rip),%xmm1
jmp    1207 <si_sprintf+0x77>
test   $0x4,%bl
je     1207 <si_sprintf+0x77>
movb   $0x2b,(%r14)
add    $0x1,%r14
add    $0xffffffff,%r13d
movslq %r13d,%r15
movb   $0x0,(%r14,%r15,1)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movapd %xmm1,(%rsp)
jne    1220 <si_sprintf+0x90>
jnp    124a <si_sprintf+0xba>
movapd %xmm1,%xmm0
call   1090 <isnan@plt>
test   %rax,%rax
je     1276 <si_sprintf+0xe6>
lea    0xe67(%rip),%rbx
mov    %r14,%rdi
mov    $0x21,%esi
mov    %r13d,%edx
call   1050 <memset@plt>
jmp    146b <si_sprintf+0x2db>
lea    0xe47(%rip),%rsi
xorpd  %xmm0,%xmm0
mov    %r14,%rdi
mov    %r13d,%edx
call   10b0 <sprintf@plt>
movapd (%rsp),%xmm0
mov    $0x23,%al
xor    %ebx,%ebx
test   %al,%al
jne    13e1 <si_sprintf+0x251>
jmp    1456 <si_sprintf+0x2c6>
movapd (%rsp),%xmm0
call   1080 <isfinite@plt>
test   %eax,%eax
je     139a <si_sprintf+0x20a>
mov    %r12b,%bpl
lea    0xd6e(%rip),%rax
movsd  (%rax,%rbp,8),%xmm2
movsd  0xda1(%rip),%xmm1
mulsd  %xmm2,%xmm1
movapd (%rsp),%xmm0
ucomisd %xmm1,%xmm0
ja     12fd <si_sprintf+0x16d>
movsd  0xd92(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    12c6 <si_sprintf+0x136>
cmp    $0x3,%r13d
je     12fd <si_sprintf+0x16d>
movsd  0xd82(%rip),%xmm1
mulsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    12de <si_sprintf+0x14e>
cmp    $0x2,%r13d
je     12fd <si_sprintf+0x16d>
test   $0x1,%bl
jne    14a5 <si_sprintf+0x315>
movsd  0xd69(%rip),%xmm1
divsd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
jbe    14a5 <si_sprintf+0x315>
lea    0xda2(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r13d,%edx
call   10b0 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x65,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     13a6 <si_sprintf+0x216>
mov    %rax,%r12
cmpb   $0x30,0x2(%rax)
jne    135a <si_sprintf+0x1ca>
lea    0x2(%r12),%rbx
mov    %r12,%rbp
add    $0x3,%rbp
nop
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %eax,%edx
call   10a0 <memmove@plt>
cmpb   $0x30,(%rbx)
je     1340 <si_sprintf+0x1b0>
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %r13d,%edx
sub    %eax,%edx
movapd (%rsp),%xmm0
jl     13ab <si_sprintf+0x21b>
mov    %eax,%ebp
lea    (%r14,%r15,1),%rbx
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
call   1070 <memcpy@plt>
movslq %ebp,%rax
sub    %rax,%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %ebp,%edx
call   1070 <memcpy@plt>
xorpd  %xmm0,%xmm0
jmp    13ab <si_sprintf+0x21b>
lea    0xd00(%rip),%rbx
jmp    1235 <si_sprintf+0xa5>
movapd (%rsp),%xmm0
movsd  0xcbd(%rip),%xmm1
ucomisd %xmm0,%xmm1
lea    0xced(%rip),%rax
lea    0xceb(%rip),%rcx
cmova  %rax,%rcx
xor    %ebx,%ebx
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
cmovne %rcx,%rbx
cmovp  %rcx,%rbx
mov    $0x23,%al
test   %al,%al
je     1456 <si_sprintf+0x2c6>
test   %rbx,%rbx
jne    1456 <si_sprintf+0x2c6>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13f6 <si_sprintf+0x266>
jnp    1496 <si_sprintf+0x306>
cmp    $0x23,%al
je     1406 <si_sprintf+0x276>
mov    %al,-0x1(%r14,%r15,1)
add    $0xffffffffffffffff,%r15
mov    %r15d,%r13d
lea    0xcdf(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    %r13d,%edx
movapd %xmm0,(%rsp)
call   10b0 <sprintf@plt>
cmpb   $0x30,0x10(%rsp)
lea    0x11(%rsp),%rsi
cmovne %rbx,%rsi
mov    %r14,%rdi
mov    %r13d,%edx
call   1070 <memcpy@plt>
cmp    $0x1,%r13d
jne    1496 <si_sprintf+0x306>
movapd (%rsp),%xmm0
ucomisd 0xc42(%rip),%xmm0
jbe    1496 <si_sprintf+0x306>
movb   $0x21,(%r14)
jmp    1496 <si_sprintf+0x306>
mov    %r14,%rdi
mov    $0x21,%esi
mov    %r13d,%edx
call   1050 <memset@plt>
test   %rbx,%rbx
je     1496 <si_sprintf+0x306>
cmp    $0x4,%r13d
mov    $0x4,%edx
cmovl  %r13d,%edx
sub    %edx,%r13d
mov    %r13d,%eax
shr    $0x1f,%eax
add    %r13d,%eax
sar    %eax
cltq
add    %rax,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <memcpy@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
test   $0x1,%bl
jne    14fe <si_sprintf+0x36e>
movsd  0xbae(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    14fe <si_sprintf+0x36e>
xor    %eax,%eax
cmp    $0x4,%r13d
setge  %al
lea    0xb68(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm2
xor    %eax,%eax
ucomisd %xmm0,%xmm2
jbe    14f2 <si_sprintf+0x362>
movsd  0xbab(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    %eax,%ecx
add    $0x1,%rax
cmp    $0x19,%ecx
je     14f2 <si_sprintf+0x362>
ucomisd %xmm0,%xmm2
ja     14dd <si_sprintf+0x34d>
lea    0xbbc(%rip),%rcx
jmp    1588 <si_sprintf+0x3f8>
xor    %eax,%eax
ucomisd 0xb60(%rip),%xmm0
jbe    1539 <si_sprintf+0x3a9>
xor    %eax,%eax
movsd  0xb5c(%rip),%xmm4
movsd  0xb5c(%rip),%xmm1
movsd  0xb5c(%rip),%xmm2
mulsd  %xmm1,%xmm4
add    $0x1,%eax
movapd %xmm4,%xmm3
addsd  %xmm2,%xmm3
ucomisd %xmm3,%xmm0
ja     1524 <si_sprintf+0x394>
cmp    %r13d,%eax
jle    1265 <si_sprintf+0xd5>
xor    %eax,%eax
cmp    $0x4,%r13d
setge  %al
lea    0xace(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm2
ucomisd %xmm2,%xmm0
ja     1561 <si_sprintf+0x3d1>
xor    %eax,%eax
jmp    1581 <si_sprintf+0x3f1>
xor    %ecx,%ecx
movsd  0xb1d(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0x1(%rcx),%rax
ucomisd %xmm2,%xmm0
jbe    1581 <si_sprintf+0x3f1>
cmp    $0x1a,%ecx
mov    %rax,%rcx
jne    156b <si_sprintf+0x3db>
lea    0xb48(%rip),%rcx
mov    (%rax,%rcx,1),%al
jmp    1267 <si_sprintf+0xd7>

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

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